DataView.Sort 属性

来源:互联网 发布:知乎 女生 自由搏击 编辑:程序博客网 时间:2024/06/05 17:40

 

属性值

一个字符串,它包含列名,后跟“ASC”(升序)或“DESC”(降序)。在默认情况下列按升序排序。多个列可用逗号隔开。

 

下面的示例指示 DataView 按照两列对表进行排序

private void SortByTwoColumns(){    // Get the DefaultViewManager of a DataTable.    DataView view = DataTable1.DefaultView;    // By default, the first column sorted ascending.    view.Sort = "State, ZipCode DESC";}


原创粉丝点击