Hi,
I'm using an UltraWinGrid to show real-time data and I'm looking for a way to show the most recent data when changes are made to the data source.
The new data from the data source is loaded into memory as a DataTable each time an update occurs. Currently, I'm rebinding the data to the grid each time, but it would be much smoother if I could simply refresh the Grid...
If I understand correctly, the UpdateData method only commits changes from the physical data source e.g. A Database. I'd like it to commit changes from a DataTable that will always have the same columns etc.
Any help will be greatly appreciated.
Cheers,
Richard
Hello Richard, DataTable is a source that hold the data in their original state and also the changes. UpdateData is forcing to update the data from UltraGrdid to DataSource, but after then you need to take care of saving it. In your scenario you are interesting of way to get updated data from DataTable. Let’s assume you make the changes already in your DataTable, if they come from other thread or some custom calculation. So you can just call AcceptChanges on your dataTable or on the row that the change occur and you should see the new data in the grid.http://msdn.microsoft.com/en-us/library/system.data.datatable.acceptchanges.aspxI hope this make the thing more clear.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Thanks Dimi - That worked a treat!