Hi,
I am refreshing sorting when I add new items in my grid. It works fine when items are not grouped. In case of grouping this refreshing doesn't work or new items are not placed in sorted order. I am refreshing sorting like this:
EventViewDg.Records.RefreshSort();
Any idea how to fix that?
Thanks,
Imad.
Hello Imad,
Thank you for your post. I have been looking into it and I can suuegst you handle the XamDataGrid’s InitializeRecord event and add the following code in its handler:
e.Record.RefreshSortPosition();
Instead of calling the Records Collection’s RefreshSort method. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
InitializeRecord event never executes in my case, as I am just adding new row in observablecollection of grid instead of changing any cell in grid.
Here is the explanation of InitializeRecord event from one of the post on infragistics forum:
"When the grid receives a notification that a property on data item changes it will raise the InitializeRecord event where the ReInitialize property of the InitializeRecordEventArgs is set to true. You could listen to the InitializeRecord event and call RefreshSortPosition on the Record."
Any other solution that I can try to sort new items in grid when items are grouped?