and not having much luck.
in InitializeRow handler I have all the infor I need but e.Row.Cells[4].IsEditable=true;
throws a compile error saying that IsEditable is readonly.
I'm guessing I need to use a style?
the column is an checkbox column,
can anyone shed some light on this for me?
thanks
I've also tried this from the initialize row event and it throw a serious error message
Style s = new Style(typeof(CheckBoxColumn)); s.Setters.Add(new Setter(IsEnabledProperty, false)); e.Row.Cells["IsLoadedFromExternalSource"].Style = s;
Hi,
It is only possible to enable disable editing globally for the XamGrid and per layout, e.g.:
<ig:XamGrid.EditingSettings>
<ig:EditingSettings AllowEditing="Cell"/>
</ig:XamGrid.EditingSettings>
<ig:XamGrid.ColumnLayouts>
<ig:ColumnLayout Key="Foo">
<ig:ColumnLayout.EditingSettings>
<ig:EditingSettingsOverride AllowEditing="Cell"/>
</ig:ColumnLayout.EditingSettings>
</ig:ColumnLayout>
</ig:XamGrid.ColumnLayouts>
In order to achieve the behavior you described, you could use the RowEnteringEditMode / CellEnteringEditMode events and make your checking in the event handlers and cancel the event, e.g.:
<ig:XamGrid x:Name="TestXamGrid"
ItemsSource="{Binding ElementName=testDataDomainDataSource, Path=Data}" CellEnteringEditMode="TestXamGrid_CellEnteringEditMode"/>
private void TestXamGrid_CellEnteringEditMode(object sender, BeginEditingCellEventArgs e)
{
if (e.Cell.Column.Key == "Name")
e.Cancel = true;
}
HTH,
actually setting the style in initializeRow is working perfectly (Now that I figured out the correct style tatrget type)