Hi,
I want to disable cell editing after display.
I try to set grid with default setting and add some rows via source code.
At run time, when I double click cell, I can edit cell data. This sitation is not I want to.
I want to lock the cell data.
Could you help me?
hi if u want to disable the cell editing .. use this code
grd.ActiveRow = Nothing
before that in the initialize event set this code
grd.DisplayLayout.Bands(0).Override.CellClickAction = CellClickAction.RowSelect
so that click action enables row selection ..
happy coding
You might want to check out this KB article:
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?
Hi Mike:
Do you know any article but for v6.3.20063.53? I'm trying to disable a cell.
Mike - Thanks for the quick response (as always). Once you said that, I tried another browser. The web page comes up in Google Chrome and IE 9, but not in IE 10 (or perhaps my browser has some problem).
I tried the link and it seems to be working fine, now. Just in case, here's the text of the article:
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
That article link is now a dead link (KB 6156). Is there a live link to the knowledge base article? I see you refer to it all over the place. I also sent a note to the web master.
Hm, I can see how that might be confusing, but it applies to all versions of the grid v4.3 and up. :)
He probably thought that because the top of the article also says:
"The information in this article applies to: UltraWinGrid (v4.3.20043)"
It says it right at the top.