Hi, i don't know how to make a cell ReadOnly, i want to have all a Row as readonly but one colum may be editable.I'm programming in C# .NEt 2008 and using an ultragrid, i like to have all columns except one in mode readonly.
Thanks
Hi,
If you are saying that you disabled the entire grid and you are still able to edit cells, then the only explanation is that whatever property you are setting is being overwritten somewhere else in your code after you set it.
My guess is that you are probably loading a layout into your grid and that's blowing away the settings you are applying in code. So you need to make sure you set them after the layout is loaded.
I've tried disabling the whole grid in C# with the code you have provided, but nothing works.
Any ideas ?
Hi James,
The link is working fine. My guess is that you are using IE10 - for some reason it has a problem with some of these links. Try switching to compatibility mode and it works.
Just in case, I have copied the text of the article here for you:
It is sometimes neccessary to make a column which is editable in the underlying data read-only or disabled in the grid.
This can be done by changing the Activation on several levels of objects. To disable editing in the entire grid or on a Band-level, use the AllowUpdate property on the override. There is an Override property on the grid's DisplayLayout and on the band, so you can disable editing on the entire grid via the DisplayLayout.Override and then override the DisplayLayout setting on any individual band. C#:
VB:
To affect an entire column, use the CellActivation Property on the column. C#:
To affect an entire row, use the Activation property of the row. C#:
To affect individual Cells, set the Activation property on the Cell. C#:
When using CellActivation or Activation, a Cell will always take on the least accesible Activation level based on it's Row, Column, and Cell Settings. For example, if the Row is Disabled, the Activation settings of the Column and Cell will be ignored. If it is neccessary to allow editing in a single Cell whose column or row is otherwise disabled or Read-only, the cell can be forced to honor it's own Activation Property by setting the IgnoreRowColActivation property on the cell to true. Note that updating and deleting are separate properties. To prevent rows from being deleted, use the AllowDelete property on the override. C#:
' Disable deleting on the entire gridthis.ultraGrid1.DisplayLayout.Override.AllowDelete = DefaultableBoolean.False' Enable deleting on the root band. This will override the DisplayLayout settingMe.ultraGrid1.DisplayLayout.Bands(0).Override.AllowDelete = DefaultableBoolean.False
Link Broken: Could this link above be re-shown? I see it in quite a few places, but it is broken.
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?