Posted 20 October 2024, 11:26 pm EST
We have a FlexGrid that is bound to a bindingsource/datatable, and we have a column that uses a DataMap (IDictionary): flexGridColumnSupplierID.DataMap = GetSupplierDataMap();
Our issue is that when the user sorts the column, it sorts by the id value of the column not the mapped string. In other words, it sorts by the data the user does not see, and not by the string that they do see.
I did a bit of a search through the forums etc… and the closest thing I could find to a solution was using an IComparer, but it is only supported for Unbound mode.
Is there anyway to do this?
I can think of one method, where would we add the text value as an inner select to the datatable, and then override the sort method to sort that column instead, but it seems like there should be a built in method as it sort of makes sorting not supported properly when using datamaps.