R
Reetu
Hi all,
I am referring to one of the msdn articles which explains
how to edit multiple rows at once in datagrid.
Query:
In pageload the datagrid is displayed with data in it. In
the textbox(contained in the datagrid) I change the data
and click on the save button located on the web form.
Now I am expecting the edited value to be available in my
following code.
txtQuantity = (TextBox) dgi.FindControl("txtQuantity");
But I see that the textbox retains the previous value.
here is the code I am using.
Can someone please tell me why I am getting the initial
value instead of the modified value.
int i;
DataGridItem dgi;
TextBox txtQuantity;
Label lblDescription;
Label lblPrice;
Label lblTotal;
for(i = 0; i <= DataGrid1.Items.Count -1 ; i++)
{
dgi = DataGrid1.Items;
txtQuantity = (TextBox) dgi.FindControl("txtQuantity");
lblDescription = (Label)dgi.FindControl("lblDescription");
lblPrice = (Label)dgi.FindControl("lblPrice");
lblTotal = (Label)dgi.FindControl("lblTotal");
.......
}
Thanks & Regards,
-Reetu
I am referring to one of the msdn articles which explains
how to edit multiple rows at once in datagrid.
Query:
In pageload the datagrid is displayed with data in it. In
the textbox(contained in the datagrid) I change the data
and click on the save button located on the web form.
Now I am expecting the edited value to be available in my
following code.
txtQuantity = (TextBox) dgi.FindControl("txtQuantity");
But I see that the textbox retains the previous value.
here is the code I am using.
Can someone please tell me why I am getting the initial
value instead of the modified value.
int i;
DataGridItem dgi;
TextBox txtQuantity;
Label lblDescription;
Label lblPrice;
Label lblTotal;
for(i = 0; i <= DataGrid1.Items.Count -1 ; i++)
{
dgi = DataGrid1.Items;
txtQuantity = (TextBox) dgi.FindControl("txtQuantity");
lblDescription = (Label)dgi.FindControl("lblDescription");
lblPrice = (Label)dgi.FindControl("lblPrice");
lblTotal = (Label)dgi.FindControl("lblTotal");
.......
}
Thanks & Regards,
-Reetu