数据集排序数据

2023-09-03 05:15:22 作者:孤独的面具°

数据表我可以用

 dataTable.DefaultView.Sort = "SortField DESC";

我得到一个数据集从数据库中,我想知道我可以做一个关于数据集如排序我该怎么做,在数据表

I'm getting a DataSet from database, I was wondering could I do a sorting on the DataSet like how I do it in DataTable.

推荐答案

您仍然可以从设定的数据访问的数据表如下,

you can still access the DataTable from the the data set as follows,

ds.Tables[0].DefaultView.Sort =" criterian";

希望这有助于。

Hope this helps.