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
927
Use Sort Indicator without causing sort action
posted

I need to perform custom sorting on my grid's data. So I trap the HeaderClickAction to Select and the SelectTypeCol to None, to disable automatic grid sorting. Then I trap the MouseDown click event to determine if and when the user has clicked on a column header. This allows me to sort data the way I need to.

 I'd like to continue to use the Sort Indicators (the small up/down triangles in the column headers of sorted columns) that are built in to the UltraWinGrid. But it seems that setting the SortIndicator value not only draws these triangles, but also actually causes the grid to sort the data.

 Is it possible to separate the Indicator from the sorting action itself? In other words, is there a way I can set the SortIndicator images in the column headers without causing the grid to try to sort the data?

Or, do I have to draw them myself, as described in KB05873?