Hi -
I have a grid that contains multiple field layouts that are represented by nested ObservableCollections.
A Total of children
50
75
10
B Total of children
-7
-2
-9
When I sort by the column, I want the rows in the nested collection to sort but I the top level collection (totals) to remain fixed. In addition, when I sort descending, the largest negative number should come first. When I sort that column descending, it should look like this:
A
B
How would I go about this?
Thanks!
Hello Sanket,
Thank you for your post.
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into the functionality that you are trying to achieve and what I can suggest is to take a look at the following forum thread, where similar functionality was discussed:
http://es.infragistics.com/community/forums/t/49234.aspx
Please do not hesitate to let me know if you have any further questions on this matter.
The example just returns the cell value in the comparer. Is there any way to get row data and compare based on datat in different columns ?
Hello,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for clarifying your issue. I have further investigated it and it seems that your best option is to use record fixing in order to achieve this kind of functionality. You can enable record fixing for your XamDataGrid as follows:
<igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AllowRecordFixing="Top"/> </igDP:XamDataGrid.FieldLayoutSettings>
You can read more information about fixinf records here: http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamDataGrid_Fixing_Records.html
If you have any further questions please do not hesitate to ask.
Thanks, the sort comparer works.
As for the first part of my question, it is confusing. Basically, I want to lock a specific row in position so sort will sort all of the rows except the ones I lock. I don't think this functionality exists in the grid - but can you suggest a way to implement it myself?