G
Guest
I am trying to sort a datatable, and return the sorted
results. Not working with a datagrid, or ASP.NET. Cannot
do the sort on the database.
DataView dv = existing table view
dv.sort = "EVENT_DATE DESC"
DataTable NewTable = new DataTable();
foreach (DataRowView drv in dv)
{
DataRow Row = drv.Row;
NewTable.ImportRow(Row);
}
return NewTable
The result is the same as the existing table. What am I
missing here?
Thanks,
David
results. Not working with a datagrid, or ASP.NET. Cannot
do the sort on the database.
DataView dv = existing table view
dv.sort = "EVENT_DATE DESC"
DataTable NewTable = new DataTable();
foreach (DataRowView drv in dv)
{
DataRow Row = drv.Row;
NewTable.ImportRow(Row);
}
return NewTable
The result is the same as the existing table. What am I
missing here?
Thanks,
David