views:

590

answers:

1

I have a datagridview that has its datasource linked to a databinding from a database. All the columns are sortable by doubleclicking the header.

Now I added one extra column by hand that just contains numbers. Strangely I cannot sort the datagridview by this column. If I doubleclick the header nothing happens.

I have set sortmode to automatic.

What am I missing here?

+2  A: 

This link should be the answer you need: Sorting an unbound column

Basically what you're trying to do is not supported. You have to handle the sorting yourself by keeping track of the direction and handle the sorting by using the SortGlyph.

Good luck, hope this helps.

joshlrogers