Any reason why string, int, etc. will sort but bool will not?
Printable View
Any reason why string, int, etc. will sort but bool will not?
Assuming that you're simply binding data to the grid and letting it create its own columns, the answer is in the documentation for the DataGridViewCheckBoxColumn:Quote:
The default sort mode for this column type is NotSortable.
I would guess that the reason is that there's nothing inherent in the values True and False to indicate that one is more or less than the other. True and False are represented internally by numbers are will therefore be sorted in numerical order when sorted and you can opt for that behaviour if you want but there is logic to not "sorting" by default. It really only makes sense to "group" values, you can do manually or automatically if you choose.