T
Tuomo
Hi!
I have a form (System.Web.UI.Page) that contains a DataGrid control and a
DataTable that contains values for the data grid and that is data bound to
the DataGrid. When I switch the grid to edit mode (e.g. if I set
DataGrid.EditItemIndex = 0) the values in the data table are displayed
correctly in TextBox controls in the DataGrid. Then, if I cause a postback
(e.g. pressing a button) and I set a new value into the data table into a
certain data field (e.g. in the Page_Load method) the TextBox contains the
old value although the data table field where the text box in data bound
contains a new value.
Why doesn't the TextBox control get updated?
I have tested that other controls such as Labels, show the current value of
the data table field but I don't understand why TextBox doesn't get a new
value.
Thank you.
BR, Tuomo
I have a form (System.Web.UI.Page) that contains a DataGrid control and a
DataTable that contains values for the data grid and that is data bound to
the DataGrid. When I switch the grid to edit mode (e.g. if I set
DataGrid.EditItemIndex = 0) the values in the data table are displayed
correctly in TextBox controls in the DataGrid. Then, if I cause a postback
(e.g. pressing a button) and I set a new value into the data table into a
certain data field (e.g. in the Page_Load method) the TextBox contains the
old value although the data table field where the text box in data bound
contains a new value.
Why doesn't the TextBox control get updated?
I have tested that other controls such as Labels, show the current value of
the data table field but I don't understand why TextBox doesn't get a new
value.
Thank you.
BR, Tuomo