0

What actually happens internally when the user clicks a column header in a DataGridView? More specifically, if the first click sorts data ascending, how does it sort descending with the next click? Does it just negate the Compare() or CompareTo() result? And which interface does DataGridView use to sort items?

1 Answer 1

1

First click sets the SortExpression property, second click appends desc to the sort expression.

You have to write your own mod if you have a column with a multi-column sort expression as it ignores the first on click 2.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.