JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
When You set the DataSource for a DataGridView to a BindingSource, I am wondering the intricacies of how it handles autosorting. Basically, (and i think it is a setting in the DataGridColumn classes, but since the current DGV is autogenerating columns, i'm not positive) when you click on the Column Header for the DGV it will sort Ascending/Descending respectively (with the nice cute little arrow graphic to discern the sort direction).
Does that use the BindingSource, or is it handled internally?
I want to enable "Multiple Column Sorting", via say CTRL+Click, so if a column header is clicked, and then I press CTRL and Click another column, it goes in order of clicks for the Sort order.
SQL: Order By Column1 ASC, Column2 ASC, Column3 DESC
or something to that effect. The Handling of the clicks and columns directions i can do, but I'm wondering if the DGV can handle multi-column Sorting or if I have to move it out to the bindingsource, and subsequently, if I must sort via the binding source, will that automatically refresh the bound DGV or do i need to refresh the DGV too in order to make the sorting affects display.
Thanks
Does that use the BindingSource, or is it handled internally?
I want to enable "Multiple Column Sorting", via say CTRL+Click, so if a column header is clicked, and then I press CTRL and Click another column, it goes in order of clicks for the Sort order.
SQL: Order By Column1 ASC, Column2 ASC, Column3 DESC
or something to that effect. The Handling of the clicks and columns directions i can do, but I'm wondering if the DGV can handle multi-column Sorting or if I have to move it out to the bindingsource, and subsequently, if I must sort via the binding source, will that automatically refresh the bound DGV or do i need to refresh the DGV too in order to make the sorting affects display.
Thanks