Skip to main content
A newer version of this page is available. .

How to: Improve Performance when Grouping Data

private void GroupData(string[] fieldNames) {
    grid.BeginDataUpdate();
    try {
        grid.ClearGrouping();
        for (int i = 0; i < fieldNames.Length; i++) {
            GridColumn col = grid.Columns[fieldNames[i]];
            if (col != null)
                col.GroupIndex=i;
        }
    }
    finally {
        grid.EndDataUpdate();
    }
}