[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(); }