How can I help you?
Grid Model Options in Windows Forms GridControl
15 Jun 20212 minutes to read
This section provides information on how to write syntax for the following GridModel Options:
- ActivateCurrentCellBehavior
- AllowScrollCurrentCellInView
- AlphaBlendSelectionColor
- ClickedOnDisabledCellBehavior
- ShowCurrentCellBorderBehavior
- DefaultGridBorderStyle
Activating current cell behavior
The following code illustrates how to activate current cell behavior:
this.gridGroupingControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;Me.gridGroupingControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAllAllow scroll for current cell view
The following code illustrates how to allow scroll for current cell view:
this.gridGroupingControl1.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.Activate;Me.gridGroupingControl1.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.ActivateAlpha blend selection color
The following code illustrates how to select alpha blend selection color:
this.gridGroupingControl1.AlphaBlendSelectionColor = Color.Red;Me.gridGroupingControl1.AlphaBlendSelectionColor = Color.RedClickedOnDisabledCellBehavior
The following code illustrates how to define the current cell behavior when disabled cell is clicked:
this.gridGroupingControl1.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.Default;Me.gridGroupingControl1.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.DefaultShow current cell border behavior
The following code illustrates how to show current cell border behavior:
this.gridGroupingControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;Me.gridGroupingControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlwaysDefault Grid border style
The following code illustrates how to set default grid border style:
this.gridGroupingControl1.DefaultGridBorderStyle = GridBorderStyle.None;Me.gridGroupingControl1.DefaultGridBorderStyle = GridBorderStyle.None