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 v18.104.22.168
ADAdministrator Syncfusion Team 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.
JRJoseph RezukeFebruary 12, 2005 07:36 PM
Thanks Clay, that did it.
ADAdministrator Syncfusion Team May 18, 2006 03: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.
ADAdministrator Syncfusion Team May 18, 2006 03:40 AM
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.