Hi to all,
I have this method, I'm trying to format in backcolor only column editable.
I setted all columns with ReadOnly = True, and then I setted only particular Column ReadOnly = False
Now I would test if I format cells by Name or by ReadOnly status, but in both ways, BackColor appears Yellow only when I doubleclick into editable cell.
I would show to user the editable columns with Yellow backcolor.
How can I do?
01.
Private
Sub
UpdateCellFormatting(
ByRef
e
As
CellFormattingEventArgs)
02.
03.
Dim
_IsEditable
As
Boolean
=
False
04.
05.
If
_SelectedItem IsNot
Nothing
Then
06.
07.
If
_SelectedItem.Personalizzazione = ListinoCliente.StringaListinoStandard
Then
08.
09.
If
e.CellElement.ColumnInfo.FieldName =
"PrezzoListino"
Then
10.
_IsEditable =
True
11.
End
If
12.
13.
Else
14.
15.
If
e.CellElement.ColumnInfo.FieldName =
"Sconto"
Then
16.
_IsEditable =
True
17.
End
If
18.
19.
End
If
20.
21.
End
If
22.
23.
If
_IsEditable
Then
24.
e.CellElement.BackColor = Drawing.Color.Yellow
25.
Else
26.
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local)
27.
End
If
28.
29.
End
Sub