Krypton OutlookGrid

Grouper, trier et admirer !

Version personnalisée de la DataGridView du .NET Winforms (C#) avec des capacités de regroupement et tri multiples.

Lecteurs Français

Malheureusement cette page n'est pas encore disponible en français.

Tree-grid mode

As treegrid mode requires algorithm with recursive parts, the code is a bit slower. You may want maximum performance if you do not need a tree mode and that's why there is a FillMode property which is set to GroupsOnly by default. To active the tree mode you need to set it to GroupsAndNodes. Even with tree mode enabled there is no need to have sublevels rows, allowing flexibility for your application.

The tree mode is symbolized by the the +/- symbol located on cells in one column of the grid. This must column must be a KryptonDataGridViewTreeTextColumn.

You can also choose to display or not lines between nodes OutlookGrid1.ShowLines = true;

To fill the grid with sublevels there are extra steps :

OutlookGridRow row2 = new OutlookGridRow(); 
row2.CreateCells(OutlookGrid1, new object[] { ... }
Then add the newly created row to its parent one by using :
row.Nodes.Add(row2); ((KryptonDataGridViewTreeTextCell)row2.Cells[1]).UpdateStyle(); //Important : after added to the parent node Same for the parent row
listOfRows.Add(row); ((KryptonDataGridViewTreeTextCell)row.Cells[1]).UpdateStyle(); //Important : after added to the rows list Those steps are here to get a proper indentation (padding) of the text in the TreeTextCells

And...that's all !

Retour