public void resortDataTable(string sortBy)
{
if (!sortBy.IsNullOrEmpty())
{
IEnumerable<DataRow> query = from row in Whatever.AsEnumerable()
orderby row.Field<object>(sortBy)
select row;
DataTable boundTable = query.CopyToDataTable<DataRow>();
Whatever = boundTable;
}
}
No comments:
Post a Comment