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

cannot reset a cell''s value after previously having been set to readonly

Thread ID:

Created:

Updated:

Platform:

Replies:

47940 Aug 16,2006 02:09 PM UTC Aug 16,2006 04:50 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 16, 2006 02:09 PM UTC

I''m using the GridControl (4.102.0.70)

I have some code that based on some condition sets a cell to read only (style.readonly = true) in addition to setting its value to some value, say 100, all using setcellinfo with an override argument. Then something happens that I need to clear out this same cell''s value, and I do so by setting this same cell''s value to an empty string (style.cellvalue = string.empty), using setcellinfo, and passing in an override argument. The problem is that even after doing so the cell''s value is not cleared out rather it continues to display the initial value of 100. I noticed however if I do NOT initially set the cell to readonly when setting its value to 100, then later when I clear it out, it does in fact clear out. Any ideas??

Thanks

GA

Administrator [Syncfusion]
Replied On August 16, 2006 04:31 PM UTC

Hi GA,

I''m not a Syncfusion developer but I recall that in order to change any properties, ReadOnly must be set to false. So you''d have to set it to false, make your changes and set it back to true.

Hope this helps!

Administrator [Syncfusion]
Replied On August 16, 2006 04:50 PM UTC

After setting style.Readonly = true for a cell, if you want to make changes to this cell, then before making the change, you must first set grid.IgnoreReadOnly = true;


grid.IgnoreReadOnly = true; //turn off readonly
grid[row,col].CellValue = ???; //change a readonly style
grid.IgnoreReadOnly = false; //turn readonly back on

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

;