C# GridView第三方控件排序方法

 1. 发现GridView禁止用户交互式地通过单击网格标题来排序的语句如下:

     this.gvwSize.OptionsCustomization.AllowSort = false;

 2. GridView根据某一个或多个字段来排序的代码如下:

             this.gcSize_OrderNo.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
            this.gcSize_OrderNo.SortIndex = 0;
            this.gvwSize.BeginSort();       //[BugHere][MustAdd]
            this.gvwSize.EndSort();

   如果不加BeginSort,EndSort好象是不能排序的。

            2011-08-03

posted @ 2011-08-03 12:16  C#老头子  Views(940)  Comments(0Edit  收藏  举报