|
-
Jul 1st, 2009, 08:39 AM
#1
Thread Starter
Frenzied Member
datagridview datatable bool won't sort
Any reason why string, int, etc. will sort but bool will not?
-
Jul 1st, 2009, 09:02 PM
#2
Re: datagridview datatable bool won't sort
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:
The default sort mode for this column type is NotSortable.
-
Jul 2nd, 2009, 07:34 AM
#3
Thread Starter
Frenzied Member
Re: datagridview datatable bool won't sort
 Originally Posted by jmcilhinney
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:
Peculiar...well then again, it is Microsoft.
-
Jul 2nd, 2009, 07:43 AM
#4
Re: datagridview datatable bool won't sort
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|