How to specify the sort field in Gridview

  • Thread starter Thread starter ad
  • Start date Start date
use with a DataView

DataView dv = new DataView();
dv.Table = myDataSet.MyTable;
dv.Sort = "myColumnName"; // the column to be sorted
myDatagrid.DataSource = dv;
 
But if the datasource of my GridView is from a ObjectDataSource.
How can I specify the sort column?
 
Back
Top