Programmatically sorting unbound data

Sep 11, 2014 at 9:10 PM
Edited Sep 11, 2014 at 9:14 PM
You'd think this would work, and it kind of does. It puts the "arrow" on the column header but it doesn't actually group/sort the column. What am I doing wrong?
dgvData.GroupColumn("clmSDate", System.Windows.Forms.SortOrder.Ascending, new OutlookgGridDefaultGroup(null));
Basically what I am trying to accomplish is to group the items for the user already, without having to drag columns and all that.

Thanks for improving the control! It looks a lot better too :)
Coordinator
Sep 21, 2014 at 2:30 PM
Hi gsmythe,

Do you want sorting or grouping ?

Please keep in mind that :
Warning :
The column SortMode property must be set to "Programmatic" as the grid will handle itself the sorting.
The column Name property must not be empty (whereas the HeaderText could be empty).


When you build the grid you can specify the group order and the sort order. That may be what you would like to achieve.
Later the control handles itself and responds to user clicks. But of course you can group/sort programmatically by calling sort/(un)group function, following by the call
Fill();
Does that helps ?