I want to have my grid them my cells in read-only columns to use a different foreground color. I was able to set this up in my theme using the IsReadOnly property of GridCellElement:
Then in the view cell formatting event, I added code to set each cell's IsReadOnly to match that of its column:
e.CellElement.IsReadOnly = e.CellElement.ColumnInfo.ReadOnly;
All of this works fine, but I get warnings that GridCellElement.IsReadOnly is obsolete. Is there another property I should be using to set this up in my theme? IsReadOnly seemed the best option in the visual style builder.
Thanks,
Rachel
<
XmlPropertySettingGroup
>
<
PropertySettings
>
<
XmlPropertySetting
Property
=
"Telerik.WinControls.VisualElement.ForeColor"
Value
=
"160, 160, 160"
/>
</
PropertySettings
>
<
Selectors
>
<
XmlClassSelector
ElementClass
=
"DataCell"
AutoUnapply
=
"False"
>
<
Condition
xsi:type
=
"XmlSimpleCondition"
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
Setting
Property
=
"Telerik.WinControls.UI.GridCellElement.IsReadOnly"
Value
=
"True"
/>
</
Condition
>
</
XmlClassSelector
>
</
Selectors
>
</
XmlPropertySettingGroup
>
Then in the view cell formatting event, I added code to set each cell's IsReadOnly to match that of its column:
e.CellElement.IsReadOnly = e.CellElement.ColumnInfo.ReadOnly;
All of this works fine, but I get warnings that GridCellElement.IsReadOnly is obsolete. Is there another property I should be using to set this up in my theme? IsReadOnly seemed the best option in the visual style builder.
Thanks,
Rachel