Posted 29 November 2018, 12:56 am EST
Hi,
how can i disable specific rows in a datagrid? The items in my itemssource have a property “CanEdit”, if this Property is set to false, i want to disable the row in the datagrid. How can i achieve this?
I have tried following code, which should work on normal .Net datagrid but does not work with c1datagrid:
<Style TargetType="c1:DataGridRowPresenter">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=CanSave}" Value="False">
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="Background" Value="LightGray"/>
</DataTrigger>
</Style.Triggers>
</Style>
Thanks