Hi All,
I having a scenario that i need to get only the updated values in the UltraWebGrid and update the DB with only the changes/Modified Records inside the grid.
How to get only the updated rows and columns values in UltraWebGrid.
Is there anyway to get only the updated records in UltraWebGrid.
Thanks in Advance,
Reagan.J
Instead of looping through all the rows, you should use either the UpdateRow or UpdateRowBatch events of the grid. These events are raised once for each modified row (whether it previously existed or is a new row), and provides you a reference to that row. The difference between the two evens is that handling UpdateRow will cause a postback (or an AJAX callback, if you've turned on the grid's AJAX functionality) as soon as you switch active rows or the grid loses focus, while UpdateRowBatch will instead wait for something else to trigger a postback to process all modified rows (and shouldn't be used if you've turned on AJAX in the grid).
If you allow adding rows to your grid, you'll probably want to look at the row's DataChanged property; a new row will have this property set to DataChanged.Added instead of DataChanged.Modified.
You can get the updated rows by accessing it's DataChanged property
{
//your logic here
}