[DevExpress] GridControl 分组

 private void checkEditAccGrouping_CheckedChanged(object sender, EventArgs e)
{
    DevExpress.XtraGrid.Columns.GridColumn column = bandedAccountID; 
    if (column == null) {
        return;
    }
    if (checkEditAccGrouping.Checked) {
        column.GroupIndex = 0;
        column.SortMode = DevExpress.XtraGrid.ColumnSortMode.Value;
        bandedGridView1.OptionsBehavior.AutoExpandAllGroups = true;
    }
    else {
        column.GroupIndex = -1;
        bandedGridView1.OptionsBehavior.AutoExpandAllGroups = false;
    }
    bandedGridView1.RefreshData();
}        

 

posted @ 2016-01-04 11:17  panpan_v1  阅读(1130)  评论(0编辑  收藏  举报