Following on from http://forums.infragistics.com/forums/p/3550/18864.aspx#19703
If I change the cell value of a row that is being used in a grouped sort, and manually call RefreshSortPosition on the row, I am finding that the row position will sometimes change (depending on other sorts on the grid), but it does not move to the correct group.
I can verify it using this code:
' Update row with new data grdRow.RefreshSortPosition() ' Check to see if we should have moved group If grdRow.ParentRow IsNot Nothing Then If grdRow.ParentRow.IsGroupByRow Then ' Get the correct value from the row, for the relevant column If CStr(grdRow.Cells(CType(grdRow.ParentRow, UltraGridGroupByRow).Column).Value) <> Cstr(CType(grdRow.ParentRow, UltraGridGroupByRow).Value) Then Debug.WriteLine("Row hasn't been moved to the correct group!!!") End If End If End If
Can anyone think of a reason this would happen?
Furthermore, this does not happen on all columns. I am trying to see what is different between the columns with the problem, and those without... :-/
Ah ha!
Ok, the columns with the problem have a custom SortComparer, because they contain Integer values that are converted to text using a valuelist, and need to be sorted by the underlying value rather than the text. Why would this prevent the rows being moved to the new group when the value changes? Do I need to make use of the GroupByComparer?
Hello,
I created a sample based on your description, please check the attached sample and let me know if this is what you are trying to do, else please modify the sample to reproduce the issue
Please send me your SortComparer class as well.
Thank you,
Thanks for getting back to me. I have attached a different sample which should demonstrate the issue quite well.
Thank you for the sample. I will go ahead and log this as a development issue in our system for further investigation. I will send you the Development issue number in the email.
Has this issue been included in any service releases? I tried to search through the release notes, but could only find the most recent service pack's notes, so I have no idea if this has been fixed.