In the MS datagrid, I can instruct the grid to do the sort on one column based on another colum. For instance, if I had the days of the week (named DaysOfWeekStr) and I wanted to sort them, I would get a funny order
Fri Mon Sat Sun Tue Thu Wed
What I need is another hidden column (named DaysOfWeekEnum). I can do that in the MS datagrid and simply put a SortMemberPath of DaysOfWeekEnum, on the DaysOfWeekStr column. When I sort my column, the days come out in order.
Normal 0 false false false EN-US X-NONE X-NONE
Hello,
You can provide your own sorting logic by setting the sort comparer property on the field settings to an object that implements the IComparer interface found in the .NET Framework.
Valerie
Hi,
How does using the column SortComparer property give the same functionality as the SortMemberPath property of the native DataGrid? The SortMemberPath allows the sorting by a different property rather than the one bound to, where as the IComparer only gets the property used in that column. I have a requirement to display a reference number comprising of some letters and part of data-time, but should be sorted by the date-time. Is this standard use of the SortMemberPath property possible with the xamGrid, without having to wrap the properties into a custom object so that the other properties are available for the comparer?