Home Forums WinForms controls Xceed Grid for WinForms Sorting columns in an exceed grid which has a viewer Reply To: Sorting columns in an exceed grid which has a viewer

User (Old forums)
Member
Post count: 23064

This isn’t a generic solution though – it requires that your comparer “knows” about the mapping of base values to text representations. Ideally there should be a way a comparer can be given both the DisplayMember and ValueMember values from the viewer.

A workaround is to build a Comparer that takes as argument the DataTable that contains the mapping (the same table used by the viewer as its datasource) – a strongly typed table would allow Find operations to get the descriptions, but then you’d need one comparer per entity that must be supported.

Imported from legacy forums. Posted by Jeremy (had 980 views)