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.
Syncfusion Feedback

readOnly columns

Thread ID:

Created:

Updated:

Platform:

Replies:

24881 Feb 12,2005 10:28 AM May 18,2006 04:40 AM Windows Forms 4
loading
Tags: GridControl
Joseph Rezuke
Asked On February 12, 2005 10:28 AM

I want to be able to togle the readOnly property for particular columns in the gridControl. I initialize the colStyles readOnly property for the columns according to some meta-data. Let''s say the first 2 cols are readOnly and the second 2 are not in a 4 column grid. I have a checkBox that I want to use to togle the columnStyle readOnly property for the last 2 cols (non-readOnly according to the meta_data). Everything is fine when the form first loads. Cols 1&2 are readOnly and cols 3&4 are not. Everything is fine when I (togle) set cols 3&4 to readOnly. However when I try to set cols 3&4 back to readOnly ''= false'' it doesn''t work. What am I doing wrong? I am using v2.0.5.1

Administrator [Syncfusion]
Replied On February 12, 2005 10:37 AM

To change styles that have been set to ReadOnly, you first must set grid.IgnoreReadOnly = true, then change the styles, then reset the grid.IgnoreReadOnly back to false.

Joseph Rezuke
Replied On February 12, 2005 07:36 PM

Thanks Clay, that did it.

Administrator [Syncfusion]
Replied On May 18, 2006 04:28 AM

Can I ask why it is like this?! This took me about 3 hours to find out. ReadOnly for me and many others concerns manual input from the keyboard not programatically changes. Im sorry to say, this is stupid, maby my anger will settle if I get a good explanation. >To change styles that have been set to ReadOnly, you first must set grid.IgnoreReadOnly = true, then change the styles, then reset the grid.IgnoreReadOnly back to false.

Administrator [Syncfusion]
Replied On May 18, 2006 04:40 AM

Hi Jonas, Setting a cell as ReadOnly also makes it ReadOnly for programmatic changes too. Please refer to the following link to know more on setting properties for the ReadOnly cells. How to set style properties for Read-Only cells in Grid? Let us know if you have any further queries. Regards, Calvin.

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

;