)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set grid model options in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: May 13, 2016 |
Last Revised Date: February 12, 2020
Tags: currentcell

Grid model options

There are six grid model options that can be set to the grid cells, which are explained below in this article.

1. Activating Current Cell Behavior

In order to set the current cell activating behavior, the ActivateCurrentCellBehavior property can be used.

C#

//Activate current cell behavior
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

VB

'Activate current cell behavior
Me.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll

Show the current cell is activated

2. Allow scroll for Current cell view

In order to set the visibility of the current cell, the AllowScrollCurrentCellInView property can be used.

C#

//Allow scroll for current cell view
this.gridControl1.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.Activate;

VB

'Allow scroll for current cell view
Me.gridControl1.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.Activate

3. Alpha Blend Selection Color

In order to have desired selection color, the AlphaBlendSelectionColor property is used to set the specified color.

C#

//Set Alpha Blend Selection Color
this.gridControl1.AlphaBlendSelectionColor = Color.OrangeRed;

VB

'Set Alpha Blend Selection Color
Me.gridControl1.AlphaBlendSelectionColor = Color.OrangeRed

Show the alpha blend selection color

4. ClickedOnDisabledCellBehavior

In order to change the disabled grid cell behavior on cell click, the ClickedOnDisabledCellBehavior property can be used.

C#

//Define the current cell behavior when disabled cell is clicked
this.gridControl1.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.Default;

VB

'Define the current cell behavior when disabled cell is clicked
Me.gridControl1.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.Default

5. Show Current Cell Border Behavior

In order to display the border of the current cell, the ShowCurrentCellBorderBehavior property can be used.

C#

//Show current cell border behavior
this.gridControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;

VB

'Show current cell border behavior
Me.gridControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways

Show the border applied in a cell

6. Default Grid Border Style

In order to change the border style of the grid cells, the DefaultGridBorderStyle property can be used.

C#

//Set default grid border style
this.gridControl1.DefaultGridBorderStyle = GridBorderStyle. DashDotDot;

VB

'Set default grid border style
Me.gridControl1.DefaultGridBorderStyle = GridBorderStyle. DashDotDot

Show the grid style
Samples:

C#: GridModelOptions_CS

VB: GridModelOptions_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon