Problem refreshing values in DataGrid UpdateCommand

  • Thread starter Thread starter Mervin Williams
  • Start date Start date
M

Mervin Williams

I have followed the Microsoft's recommendations for the UpdateCommand event
of the DataGrid control. That is, after setting the new values in the row,
I call the following methods at the end of the UpdateCommand:

daContactUpdate(dsCompanyInfo);
DataGrid1.EditItemIndex = -1;
DataGrid1.DataBind();

Nonetheless, after editing a row and clicking the update hyperlink for that
row, initially the values are the same as the original values. However, if
I put the row into edit mode, make no changes, and then click update again,
the new value is displayed.

How do I get the new value to display as soon as the update hyperlink is
clicked after a change is made?

Mervin Williams
 
The approach that is followed with datasource of the grid and values in the grid is disconnected approach

Remember hen u r updating the values u are updating the values in the grid but not in the datasource(example- dataset). So on click of update first u try to retrive the values in the grid and store in datasource of grid and the assign it to grid and bind the data
 
Can you give me a code example of what you are describing?

Thanks

SaiPavan said:
The approach that is followed with datasource of the grid and values in
the grid is disconnected approach.
Remember hen u r updating the values u are updating the values in the grid
but not in the datasource(example- dataset). So on click of update first u
try to retrive the values in the grid and store in datasource of grid and
the assign it to grid and bind the data
 
Back
Top