Infragistics(R) NetAdvantage(R) Windows Forms
GroupByRowExpansionStyle Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridOverride Class : GroupByRowExpansionStyle Property

Gets/sets the value which determines how GroupBy rows can be expanded/collapsed by the end-user. Setting this property to 'DoubleClick' or 'Disabled' will prevent expansion indicators from appearing in the GroupBy rows. Note, The GroupBy rows can be expanded/collapsed via the Left and Right arrow keys as well as Enter for all settings except 'Disabled'.

Syntax

Visual Basic (Declaration) 
Public Property GroupByRowExpansionStyle As GroupByRowExpansionStyle
C# 
public GroupByRowExpansionStyle GroupByRowExpansionStyle {get; set;}

Example

This snippet demonstrates the GroupByRowExpansionStyle and GroupByRowInitialExpansionState properties on the UltraGridOverride class. These properties can be used to customize the way that users can expand GroupBy rows and whether GroupBy rows are initially expanded or collapsed.

Visual BasicCopy Code
Imports Infragistics.Win.UltraWinGrid

Sub Form1_Load(sender As Object, e As System.EventArgs)
   ' Prevent expansion indicators from appearing in the GroupBy rows.  The end-user can 
   ' still expand the GroupBy rows via double-clicking or the keyboard.
   '
   Me.ultraGrid1.DisplayLayout.Override.GroupByRowExpansionStyle = GroupByRowExpansionStyle.DoubleClick
   
   ' Make it so that the GroupBy rows will automatically be expanded when a column is grouped.
   '
   Me.ultraGrid1.DisplayLayout.Override.GroupByRowInitialExpansionState = GroupByRowInitialExpansionState.Expanded
End Sub
C#Copy Code
using Infragistics.Win.UltraWinGrid;

private void Form1_Load(object sender, System.EventArgs e)
{	
	// Prevent expansion indicators from appearing in the GroupBy rows.  The end-user can 
	// still expand the GroupBy rows via double-clicking or the keyboard.
	//
	this.ultraGrid1.DisplayLayout.Override.GroupByRowExpansionStyle = GroupByRowExpansionStyle.DoubleClick;

	// Make it so that the GroupBy rows will automatically be expanded when a column is grouped.
	//
	this.ultraGrid1.DisplayLayout.Override.GroupByRowInitialExpansionState = GroupByRowInitialExpansionState.Expanded;
}

See Also