Datagridview sort

  • Thread starter Thread starter Arne Garvander
  • Start date Start date
A

Arne Garvander

When I click a column in my datagrid a sort occur.
If I click the column with dates, it sorts in m/d/y order. I would like it
to either sort in y/m/d order or I would like to turn off the sort.
It seems like by date is in a text format. Maybe I can change the data type
to datetime and the sort will work again.
(In worst case I have to change my dates to figs, maybe figs sort better
than dates)
 
When I click a column in my datagrid a sort occur.
If I click the column with dates, it sorts in m/d/y order. I would like it
to either sort in y/m/d order or I would like to turn off the sort.
It seems like by date is in a text format. Maybe I can change the data type
to datetime and the sort will work again.
(In worst case I have to change my dates to figs, maybe figs sort better
than dates)

With DataGridView (I don't know about datagrid), you should make your data
be a date rather than a string. You will then sort chronologically, and the
dates can be displayed in any date format. Ditto for other value types.
 
Back
Top