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.

Cannot edit read only cells

Thread ID:

Created:

Updated:

Platform:

Replies:

54463 Jan 9,2007 12:30 PM Jan 9,2007 03:14 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 9, 2007 12:30 PM

In the grid control, the user can enter data in the grid or select to populate data for edit. Some columns can't be edited when data is pre-populated as they are read only. I set this by setting the readonly property to true.

When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.

Also, I am trying to set the background color of the readonly cells and unable to do it.

Can someone tell me what I may be missing. It's not a bound grid. I populate the values programmatically. Thanks in advance.

Administrator [Syncfusion]
Replied On January 9, 2007 01:03 PM

Try setting

grid.IgnoreReadOnly = true;

before you try to programatically change any style properties for cells that are readonly.

Administrator [Syncfusion]
Replied On January 9, 2007 01:12 PM

Thank you very much. That was the property I needed to set.

>In the grid control, the user can enter data in the grid or select to populate data for edit. Some columns can't be edited when data is pre-populated as they are read only. I set this by setting the readonly property to true.

When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.

Also, I am trying to set the background color of the readonly cells and unable to do it.

Can someone tell me what I may be missing. It's not a bound grid. I populate the values programmatically. Thanks in advance.

Administrator [Syncfusion]
Replied On January 9, 2007 03:14 PM

>>When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.

>>Also, I am trying to set the background color of the readonly cells and unable to do it.

To do either of these tasks on a ReadOnly cell, you still need to set grid.IgnoreReadOnly = true;

Here is a little sample illustrating the effect of IgnoreReadOnly on setting BackColor and calling ClearCells.

http://www.syncfusion.com/Support/user/uploads/WindowsApplication59_ca3eb2d5.zip

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.

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.

;