I'm using telerik:RadgridView
control in my MVVM
WPF application. In a scenario i have to compare tow properties and set a property IsReadOnlybinding
to "True" or "False" for the column.
//Code:
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnlyBinding="{Binding IsExists }" >
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="30" SelectionLength="30" />
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
In the above code i have checked IsExists
property and made the column ReadOnly
. Now i have to check another property "Id". If the Id property is greater than 0 and IfExists
is True
then make the column ReadOnly
.
How can i achieve this?