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
735
WinGrid custom column sorting
posted

Hi, I have a grid with custom column comparer class for each column to do custom sorting. Right now, I can do  one column sorting, or multiple column sorting by holding shift key and select multiple columns. However, we  want to always add the first column for sort. User wants to just click one of the other column to perform two columns sorting without holding the shift key. In other word, we want to add the first column to sorting columns as the first sort no matter which column user clicks.

One possible way to do that, I think, is to disable the column click sorting on column header, catch the header click event, then programatically add the first column and the column user click to sorted column list.

Is there any easy way to do that?

Thanks,
Zongwen