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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

enabled property question.

Thread ID:

Created:

Updated:

Platform:

Replies:

24435 Feb 3,2005 05:50 PM UTC Feb 4,2005 03:02 PM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 3, 2005 05:50 PM UTC

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?

Administrator [Syncfusion]
Replied On February 3, 2005 09:28 PM UTC

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

Administrator [Syncfusion]
Replied On February 4, 2005 02:44 PM UTC

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

Administrator [Syncfusion]
Replied On February 4, 2005 03:02 PM UTC

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

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.

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

;