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
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?
Link Broken: Could this link above be re-shown? I see it in quite a few places, but it is broken.
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
I'm trying what you are saying and definitely not getting the results I expect. row[0].cells gives me the list object in a cell collection format and I can't change the activation on that to alter the editability on the grid.
Hi Brandon,
I'm not sure what you mean by "the list object in a cell collection format".
row.Cells[0] will return an UltraGridCell object. There's no way it could ever return anything else. That's the return type of the property.
Also, you are responding to a thread that is 4 years old, so I'm not even sure which part of this thread you are referring to.