in the below code im trying to retrieve data from database into dynamic textboxes gridview.but it is showing empty textboxes .Please check below code.
private void itemsview11111()
{
string Connection = System.Configuration.ConfigurationManager.ConnectionStrings["adata"].ConnectionString;
SqlConnection cn = new SqlConnection(Connection);
cn.Open();
string str = "select Item,Description,Quantity,Price from testitem where PID=@PID";
SqlCommand cmd = new SqlCommand(str, cn);
cmd.Parameters.Add("@PID", SqlDbType.Int);
cmd.Parameters["@PID"].Value = userid;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "testitem");
foreach (DataRow dr in ds.Tables["testitem"].Rows)
{
int rowIndex = 0;
...
Go to the complete details ...