public static void csSort(this ColumnView gv, string colname, bool Ascending = true) { gv.ClearSorting(); GridColumn col = gv.csColumn(colname); col.SortOrder = Ascending ? DevExpress.Data.ColumnSortOrder.Ascending : DevExpress.Data.ColumnSortOrder.Descending; }
public static void csSort(this ColumnView gv, int colNo) { gv.ClearSorting(); gv.Columns[colNo].SortOrder = DevExpress.Data.ColumnSortOrder.Ascending; gv.Columns[colNo].SortIndex = 0; }