How to set up Readonly Column in xamGrid, for example, for system generated ID column?
Hi,
You need to set the EditorStyle property on the CheckBoxColumn, and the style should target the CheckBox.
Note: i believe in order to remove the the 'dimmed' checkbox look, you'll need to re-template the checkbox, as that would be part of it's Disabled visual state.
-SteveZ
I have a ReadOnly XamGrid CheckBoxColumn.
I'd like the checkmark, when checked, to not appear dimmed and instead appear as if IsReadOnly is set to "False" on the CheckBoxColumn.
I've tried setting the CellStyle to Bold or ExtraBold as shown below, but it doesn't achieve the results I want, instead there is no change in the appearance of the checkmarks in the column:
<Style x:Key="BoldCellStyle" TargetType="ig:CellControl"> <Setter Property="FontWeight" Value="ExtraBold"/></Style>
...
<ig:CheckBoxColumn CellStyle="{StaticResource BoldCellStyle}" IsReadOnly="True" ...
Is there a way to make the cells look the way I want them to?
If you access the column by it's Key you can get the ColumnBase object, cast it to the EditableColumn and set it's IsReadOnly flag
sorta like this
EditableColumn ec = grid.Columns["myKey"] as EditableColumn;
if (ec!=null)
ec.IsReadOnly = true;
Or if you declare your columns in Xaml, columns that support that property (like TextColumn, CheckBoxColumn) can just set the property there.
>