Let’s say I have a xamDataGrid that contains two columns A and B. Column A is a hidden column that contains a particular sort key that we use to sort the data in column B properly. When a user clicks onto Column B’s label, how do I sort that grid by what’s in column A?
Thanks for the help!
Greg
Currently there is nothing built into the control to provide this. The FieldSettings has a SortComparer property but the value of the cells are passed to that and not the cell or record itself. So I think in order to accomplish this you will probably have to programmatically added a FieldSortDescription for the hidden field to the FieldLayout's SortedFields (either before/after depending on how you need to sort) so that you sort taking both values into account. You may also want to submit a suggestion that we add something so that we pass in the Cell or DataRecord into the SortComparer's Compare method.
Hello,
Does anybody know if this functionality has been added yet?
This functionality is still not built-in in our XamDataGrid, so for the moment the best option is to follow what Andrew explained, until the feature is implemented.
Hope this helps you.
Thanks for the reply Stefan, I'll use the workaround.
What is the current status in Infragistics 2014 Volume 1 or 2?
As this is a standard property in the standard datagrid from Microsoft, I would expect not to loose behaviour with the Infragistics controls.
Kind regards,
Erik