Hi everyone!
I was wondering if I could force xamDataGrid to rebind only one record (or a set of records)?
Here's what I do: The grid is used only for displaying data (data is retrieved from a remote database). Sometimes some outer actions cause minor changes in DB. And my application receives those changes, i.e. I know exactly what DataRows have been changed. But I have to rebind the whole grid for the changes to appear. And also, I lose current selection in the grid after rebind.
So, how can I rebind (edit) specific row in the xamDataGrid?
Thanks
By merging I mean invoking the "Merge()" method of a dataset.
Thanks a lot, Joe. That was a big "oops, haven't noticed that!" :)It works just as expected. But I still have one issue, if I merge the source dataset with another dataset (of the same schema) - nothing happens. When debugging, I clearly see the dataset have been changed, but the grid doesn't catch it. But if I manually change some field in the dataset, everything's fine.
Do you know what causes this problem?
I strongly advocate for a RefreshRecord method that works comparable to WinGrids RefreshRow method. Not only would I like to rebind a single record (in case binding just doesn't pick it up because we have to bind to property that cannot be monitored using IPropertyNotifyChanged), but also have the means to fully recreate a row without having to worry about cell values being cached due to virtualization. I currently have to rebind the whole data source in order to get around these issues...
Cheers,
Philipp