Hi,
I've created a grid with many column and I've set for many of those columns the property "CellActivation = Activation.NoEdit" and for some column I allow editing
The problem is, I must allow editing (non-editable cells) depending of the value entered in an editable cell.
I explain, I've an editable cell binded to a boolean (the grid display by default a checkbox and it's ok). if this checkbox is set checked (Set to true) I must allow the user to set a date (the cell nearby) who is not editable by default.
How can I do shuch things, I've tried many way but the proble is, the CellActivation property is a "UltraWinGridColumn" property so if I set this property to "Activation.AllowEdit" I do not allow edit the cell of the active row, I allow edit the entire column and I don't want to do that.
Sure, I could do that too.
Hi Fred,
What you have here will work, but it's a bit in efficient to set IgnoreRowColActivationon every cell. Why not simpy forego setting the CellActivation property on the column - thus leaving the column editable and setting the Activation on the Cell to NoEdit like you are already doing?
Your rigth about the InitializeRow Event, but :
I've previously done such things. Like I've written in my previous post, I've set the cell activation to no on the Initialize_Layout method. In that method I've set the activation of each column. By default, the cell activation property cannot bypass the activation done by column or row.
To bypass Row or Column activation we must set the "IgnoreRowColActivation" property to "True"
So, to made my code work I've written such thing in the InitializeRow Event:
If CType(e.Row.Cells("Cell1").Value, Boolean) = True Then
' Get the value of the cell to know if we must allow edit to another cell
e.Row.Cells("Cell2").IgnoreRowColActivation = True
Else
End If
hi,
U might want to try writing the following code in _grdName_InitializeRow Event.
_grdName.DisplayLayout.Override.CellClickAction = CellClickAction.EditAndSelectText;
Cheers.
Thanks nsmith555,
I've already tried all properties described in that document but one important thing to remember is
From the KnoledgeBaseArticle:
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.
I had previously set the activation of the column to "NoEdit" in the initializeLayout method. So even if I tried to set the activation for a cell, the grid was never use that activation. I'd to force the cell activation with the "IgnoreRowColActivation" property.