The code snippet I provided does not sort the DataSet. It creates a DataView from the DataSet and then sorts the DataView. At that point you could use the DataView instead, or you could then create (or add to your existing) DataSet by using something like:
DataSet ds = new DataSet();
DataTable dt = dv.Table;
ds.Tables.Add(dt);
Member
10 Points
170 Posts
Re: sorting a dataset without any datagrid
Apr 30, 2006 10:16 AM|James Steele|LINK
DataSet ds = new DataSet();
DataTable dt = dv.Table;
ds.Tables.Add(dt);
Then you could use the DataSet however you like.
James Steele