Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
IComparer Sort Not Working on UltraWinGrid
posted

I have implemented an IComparer class to use on a column that can contain numbers or strings. I'm assigning the comparer in the constructor of the form that has the grid:

grid.DisplayLayout.Bands[0].Columns["Number"].SortComparer = new InvoiceNumberSort();

The comparer works as expected when tested on an arraylist of values (so I know that's not the problem), but when the columnheader is clicked on the grid it appears to be using the default sorter. The HeadClickAction is set to SortSingle

e.g.  the expected order is 1,8921,8923,8931,28000,z3423

but the actual order is  1, 28000,8921,8923,8931,z3423

Is there anything else I need to do to get the sort to work when the user sorts on the header?

Parents Reply Children
No Data