Hello
I'm currently using GridView.Sort("Column", ASC")
It works perfectly and sorts my gridview, however once I get to 10 or higher the sort order stops working and it goes. 1,10,2,3,4,5,6,7,9.
Here is my code would anyone care to explain why it does this?
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(@"xml\" + Request["Gradebook"] + ".xml"));
foreach (DataColumn dc in ds.Tables[0].Columns)
{
dc.ColumnMapping = MappingType.Attribute;
}
//Dataview customised so that it can sort by, 'SortOrder' column.
System.Data.DataView dv = new System.Data.DataView(ds.Tables[0]);
dv.Sort = "SortOrder ASC";
gv.DataSource = dv;
gv.DataBind();
SortOrder is just a number from 1-100.
Thank you!