H_G H_G - 4 years ago 283
Vb.net Question

Sorting a C1Flexgrid with datasource in own order

I have a ComponentOne flexgrid (winforms) control with an (system.data.)datatTable as dataSource.

When the user clicks on the column header, I want that table sorted after this column with my own order. (one of the columns is a string column, where I want my own way of sorting)

I tried to override the sort functions of the flexgrid and use an own sort provider, but they are not called.

I think they sort within the datatable. Is there a way to tell the datatable how to order my column? Can I override the IComparer compare method of the defaultView or something like that?

Answer Source

When C1FlexGrid is data bound, sorting is governed by its data source. Refer this SO answer to do that


PS: Since this is a SO link, I can assume that it won't be deleted.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download