Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# datagridview order rows?

I have a datagridview with a number of columns, one of these is a datetime column. I want to display the rows from most recent downwards. e.g. Today Yesterday The Day Before Yesterday etc.

Is it possible to do this with the datagridview? The gridviews datasource is an xmldocument.......

help appreciated greatly.

Regards,

like image 625
Goober Avatar asked Jul 02 '09 10:07

Goober


1 Answers

 this.dataGridView1.Sort(dataGridView1.Columns["DateTime"], ListSortDirection.Ascending);
like image 62
Goober Avatar answered Oct 08 '22 01:10

Goober