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. Image for the cookie policy date
close icon

ReadOnly

If I set a cell to readonly. How can I put a value programmaticaly in the cell? I tried putting the cell to readonly = false and it doesn't work. Example With grdControl1.item(1,1) .readonly = true .readonly = false .text = "hello" end with I have version 1.5

3 Replies

AD Administrator Syncfusion Team November 20, 2002 03:29 PM UTC

> If I set a cell to readonly. How can I put a value programmaticaly in the cell? I tried putting the cell to readonly = false and it doesn't work. > > Example > > With grdControl1.item(1,1) > .readonly = true > .readonly = false > .text = "hello" > end with > > I have version 1.5 You can set grid.Model.IgnoreReadOnly = true, then do your changes and then set grid.Model.IgnoreReadOnly = false Stefan


RE Raphael Eschmann January 15, 2003 10:59 AM UTC

Hi, I have some cells with the properties set to readonly = True and enabled = false to not be able to to select and modify their content (through the grid and programmatically). Thats work fine but, when I copy a range of cells and paste, the readonly's cell is modified !!! There is the same wrong behavior with a drag/drop of range of cells. Any idea ?


AD Administrator Syncfusion Team January 15, 2003 03:55 PM UTC

Currently, to avoid readonly cells being pasted over, you can handle the PasteCellText event. In your handler, you can use e.Style.ReadOnly to test if the cell is readonly. If is, you can set e.Cancel to stop that particular paste, or set e.Abort to stop all all pastes from this point.

Loader.
Live Chat Icon For mobile
Up arrow icon