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.
Unfortunately, activation email could not send to your email. Please try again.

gridControl disable style

Thread ID:

Created:

Updated:

Platform:

Replies:

45675 Jun 26,2006 08:27 PM Jun 26,2006 09:05 PM Windows Forms 1
loading
Tags: GridControl
Rasesh Chauhan
Asked On June 26, 2006 08:27 PM

Hello, If I have to disable the GridControl, I do like = gridControl1.Enabled = false but still it has a same style, just I cannot change the values or move the scroll bars. I need a style like when we disable a button, it has different disable style. How can i do same for gridcontrol ?

Administrator [Syncfusion]
Replied On June 26, 2006 09:05 PM

Hi Rasesh, You can handle style properties manually to have disabled look, like set the TableStyle.BackColor to gray or some other colors or can change the color of the gridlines etc. The following code represents this. ****************** if(this.gridControl1.Enabled == false) { this.gridControl1.BackColor = SystemColors.Control; this.gridControl1.BaseStylesMap["Row Header"].StyleInfo.TextColor = System.Drawing.SystemColors.Control; this.gridControl1.BaseStylesMap["Column Header"].StyleInfo.TextColor = System.Drawing.SystemColors.Control; this.gridControl1.BaseStylesMap["Row Header"].StyleInfo.CellAppearance = GridCellAppearance.Flat; this.gridControl1.BaseStylesMap["Column Header"].StyleInfo.CellAppearance = GridCellAppearance.Flat; } ****************** Best regards, Madhan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;