I do a lot of reloading my XamDataGrid after performing some function. How can i reload the collection that the XamDataGrid is bound to, and yet maintain the same sorting as before the reload? For example, my xamDataGrid initially sorts my data by Invoice #. But if the user chooses to sort by School Name, and then reloads the data, it is again sorted by Invoice #, even though School Name has the little arrow in its field header. So its showing that the grid is sorted by School Name, but is actually sorted by the Invoice # again. Thanks!
Hello Travis,
I am just checking, if you need any further assistance on this matter.
i have not yet had a chance to work on this aspect of my project, i will let you know
Hi Travis,
Thank you for your reply.
Let me know, if you have any question after testing the provided approach.
Finally got back to this. How can i call Load or Save methods for loading/saving customizations from my ViewModel? I have some scenarios where the UserControl's view model data is reloaded, but the user control itself is not being loaded or unloaded, so i can't simply attach the Load/Save of customizations to, for example, the User Control Loaded/Unloaded events.
i also now see the sorting etc is applied BEFORE my view model has finished adding all the items to the observable collection the grid is bound to. How do I apply the load customizations (sorting) AFTER the Grid is done loading? Is there an event for this?
Thank you for your replies. You could look though the following forum thread where Krasimir has suggested an approach on how to load/save the layout customization of the XamDataGrid in the view model:
http://www.infragistics.com/community/forums/t/74206.aspx
Let me know, if you need any further assistance on this matter.