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
close icon

gridControl disable style

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 ?

1 Reply

AD Administrator Syncfusion Team June 27, 2006 01:05 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon