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 question for GridControl "Control" celltypes

Hello, I have a GridControl that has its default TableStyle.ReadOnly property set to true. I would like to add a GridDataBoundGrid object to this grid control, and make it so that the user can edit the contents within the embedded bound grid. However, I cannot seem to figure out how to tell the grid to allow me to do so short of not setting the default tablestyle readonly property to false. I've added the bound grid to a coverage range within the GridControl, and I have specified the styleinfo that contains the bound grid to readonly equals false. I can post a code sample if it will help. I'm using 1.6.1.5 of the Essential Suite. Thanks!

2 Replies

AD Administrator Syncfusion Team November 13, 2003 12:17 AM UTC

If cell 4,3 is the top left cell in your covered range that holds the GridDataBoundGrid, then you could try this: grid.IgnoreReadOnly = true; grid[4,3].ReadOnly = false; grid.IgnoreReadOnly = false; to turn off the ReadOnly on that particular cell. But I am not sure this will be sufficient depending upon how you have set up the embedded GridDataBoundGrid. You have to make sure that that grid is not readonly for some reason.


PL Paul Laudeman November 13, 2003 10:41 AM UTC

Thanks for the quick response. The problem, as it turns out, is rather odd. It seems that the "TableStyle" property of the GridControl in VB has a "Default" property when using Intellisense. So if you set the ReadOnly property like this: Me.GridControl1.TableStyle.Default.ReadOnly = True Then no matter what you try to do, even as you suggested setting the "IgnoreReadOnly" property of the grid, and the "ReadOnly" property of the cell that I'm adding the grid to, will not make a difference. However, if I just set the TableStyle to ReadOnly like this: Me.GridControl1.TableStyle.ReadOnly = True then I don't have any problems at all (even if the style I dropped the grid into is still marked as ReadOnly)! > If cell 4,3 is the top left cell in your covered range that holds the GridDataBoundGrid, then you could try this: > > grid.IgnoreReadOnly = true; > grid[4,3].ReadOnly = false; > grid.IgnoreReadOnly = false; > > > to turn off the ReadOnly on that particular cell. But I am not sure this will be sufficient depending upon how you have set up the embedded GridDataBoundGrid. You have to make sure that that grid is not readonly for some reason.

Loader.
Live Chat Icon For mobile
Up arrow icon