Gets a list of the
Group objects used as templates to create the groups that will be contained within the grid.
Property Value
A reference to a
Xceed.Grid.Collections.GroupList object containing a list of the groups used as templates to create the groups that will be contained within the grid.
The following example demonstrates how to add 2 groups to the grid's GroupTemplates.
Dim group As New Group()
group.GroupBy = "ShipCountry"
group.HeaderRows.Add( New GroupManagerRow() )
gridControl1.GroupTemplates.Add( group )
' If a group is created using the constructor that accepts a string as its GroupBy, it
' will automatically contain a GroupManagerRow in its HeaderRows collection.
gridControl1.GroupTemplates.Add( New Group( "ShipCity" ) )
' If the groups were created and added to the grid outside of calls to the BeginInit and EndInit methods,
' the <see cref="M:Xceed.Grid.GridControl.UpdateGrouping"/> method must be called in order for the modifications to be reflected
' in the grid
gridControl1.UpdateGrouping()
Group group = new Group();
group.GroupBy = "ShipCountry";
group.HeaderRows.Add( group );
gridControl1.GroupTemplates.Add( group );
// If a group is created using the constructor that accepts a string as its GroupBy, it
// will automatically contain a GroupManagerRow in its HeaderRows collection.
gridControl1.GroupTemplates.Add( new Group( "ShipCity" ) );
// If the groups were created and added to the grid outside of calls to the BeginInit and EndInit methods,
// the <see cref="M:Xceed.Grid.GridControl.UpdateGrouping"/> method must be called in order for the modifications to be reflected
// in the grid.
gridControl1.UpdateGrouping();
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2