Home Forums WinForms controls Xceed Grid for WinForms Grouping columns programatically Reply To: Grouping columns programatically

User (Old forums)
Member
Post count: 23064

 Here is an example :

Xceed.Grid.

Group group1 = new Xceed.Grid.Group();

Xceed.Grid.

GroupManagerRow groupManagerRow1 = new Xceed.Grid.GroupManagerRow();

group1.Collapsed =

true;

group1.GroupBy =

“Country”;

group1.HeaderRows.Add( groupManagerRow1 );

gridControl1.GroupTemplates.Add( group1 );

 

BTW, a good trick to learn how to do things programmatically is do to them in the designer, then look at the code that was generated, and then reproduce it in code.

Imported from legacy forums. Posted by André (had 558 views)