Hello,
We have a requirement from one of our client to provide end user a window to define multi sort criteria. Just like how we do sorting in Excel. I have attached screenshot from Excel as well. We are using 13.1. Is there a setting which can be turned on a grid to enable this window?
Thanks,
Yasir
Thanks for the update. This would work.
Hello Yasir,
I am just checking about the progress of this issue. Let me know If you need my further assistance.
Thank you for using Infragistics Components.
You could sort UltraGrid by more than one column, in order to this trough code you should add UltraGridColumn object to the SortedColumnsCollection, then grid will sort data prioritizing columns based on the order on which they were put in this collection.
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.UltraGridBand~SortedColumns.html
So in your case you should implement your user interface, which allows user manipulates SortedColumns collection. I’ve implemented simple sample where I first remove all sorted columns from the sorted columns collection of the band, in order to sort the grid from scratch. Then get the column key from a text field add the corresponding column to the band’s SortedCoulmns using:
ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Add(string key, bool descending);
Please feel free to modify my sample based on your custom needs.
If you have any additional question feel free to let me know.