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. Image for the cookie policy date
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
Tags: currentcell

Grid model options

There are six WinForms Grid Control 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.


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


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

Activating current cell in WinForms Grid

2. Allow scroll for Current cell view

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


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


'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.


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


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

Alpha blend selection color in WinForms Grid

4. ClickedOnDisabledCellBehavior

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


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


'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.


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


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

Current cell border in WinForms Grid

6. Default Grid Border Style

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


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


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

Border style in WinForms Grid

C#: GridModelOptions_CS

VB: GridModelOptions_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
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