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
315
Custom sorting - prevent default but still have an indicator
posted

I would like to handle sorting in a custom way. I know I can use Sorting event for this and set e.Cancel = true. This way I can stop grid from performing sorting on its own.

The problem is that I would still like to have a sorting indicator in the header (near label). I can accomplish that by adding following line to the Sorting event handler:

e.FieldLayout.SortedFields.Add(e.SortDescription);

but after that the default sorting mechanism executes despite setting e.Cancel = true. What's your ideas on that?