Home Forums WinForms controls Xceed Grid for WinForms How to restore groupings

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13709 |

    Hi,

    I want my application to restore grid grouping between runs. I found that I can get list of grouped fields with GroupByRow.GetCells method. But I cannot find how to restore groups programmatically. Any help is appreciated.

    Imported from legacy forums. Posted by iwds (had 2471 views)

    User (Old forums)
    Member
    Post count: 23064

    <code>grid.BeginInit();
    grid.GroupTemplates.Clear();
    AddGroup(grid.Columns[“groupColumn1”]);
    AddGroup(grid.Columns[“groupColumn2”]);
    grid.EndInit();
    void AddGroup(Column c) {
    Group g = new Group();
    g.GroupBy = c;
    g.HeaderRows.Add(new GroupManagerRow());
    grid.GroupTemplates.Add(g);
    }</code>

    Imported from legacy forums. Posted by Tommy (had 202 views)

    User (Old forums)
    Member
    Post count: 23064

    It works. Thanks

    Imported from legacy forums. Posted by iwds (had 3498 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.