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

enabled property question.

Hi, Is there way you can make the grid appear like a button does or a frame or many other windows controls appear when the enabled property is set to false. If you make a new project and put a grid and a button on the form. Set both to enabled=false and run. The button looks not clickable but the grid looks the same whether its true or false. Is there anyway to make it look like the button?

3 Replies

AD Administrator Syncfusion Team February 3, 2005 04:28 PM

Hi Pat, you could handle the PrepareViewStyleInfo event and when grid.Enabled is set to false return a different look for cells, e.g. set style.Enabled = false, style.TextColor = SystemColors.GreyText etc. Stefan


AD Administrator Syncfusion Team February 4, 2005 09:44 AM

Ok that works but when i try to change it back when a certain button is clicked it doesnt seem to work. Can i just change it back in a button click event and if so what color was the color i changed it from? The original color


AD Administrator Syncfusion Team February 4, 2005 10:02 AM

After you change the .Enabled property on the grid try also calling .Refresh(). Then the grid should repaint correct (since your code in PrepareViewStyleInfo criteria should not get hit any more) Stefan >Ok that works but when i try to change it back when a certain button is clicked it doesnt seem to work. Can i just change it back in a button click event and if so what color was the color i changed it from? The original color

Loader.
Live Chat Icon For mobile
Up arrow icon