Hi,
is there a way to sort values in a list view by respect a sort level.For example I have got a column with a description and a column with dates and a column with time.If I add a sort order for the main column description the values are filtered by this but now I want to sort this result twice in form of the dates column.That we have got a sort in a sort.Let me give you some values so that you are able understand what I mean:
desc. dates timetest 03.01.2008 11:40test 01.01.2008 10:40vuw 01.01.2008 10:40abc 02.01.2007 13:11at the moment when I'm sorting by description column I've got this result: desc. dates timeabc 02.01.2007 13:11 test 03.01.2008 11:40 test 01.01.2008 10:40 vuw 01.01.2008 10:40
but I would like to have this: desc. dates timeabc 02.01.2007 13:11 test 01.01.2008 10:40 test 03.01.2008 11:40 vuw 01.01.2008 10:40 how to get this? thx for your help!
RegardsTim Mischkin
The IComparer interface is defined in the System.Collections namespace (see http://msdn2.microsoft.com/en-us/library/system.collections.icomparer.aspx)
The UltraListViewColumnBase class exposes a SortComparer property. Each member of the SubItemColumns collection derives from this type, as does the MainColumn.
The 'Infragistics File Explorer' sample, which is one of the UltraListView samples, contains a class, 'FileSystemSortComparer', which implements this interface and demonstrates how to customize sorting.
sorry but where to find this interface.
Implements from namespaces Infragistics.Win.UltraWinListView or Infragistics.Win don't show me this interface as available. Furthermore I don't see property for the subColumns called "SortComparer. Can you send me an short example code?thank you very much!
Regards
You can accomplish this behavior using the column's SortComparer property. It is of type IComparer; create a class that implements that interface, and assign an instance of it to the SortComparer property. Your implementation would then consider both the description and date instead of just the description.