Hi,
I found this blog post http://www.buildsucceeded.com/post/2009/07/17/WPF-Disabling-a-row-in-a-Grid-based-off-of-a-value-in-the-source.aspx that talks about using style triggers to turn the grid row on/off using binding. I cannot make this to work with my HierarchyChildTemplate control.
Is this supposed to work?
Petar.
I found this blog post http://www.buildsucceeded.com/post/2009/07/17/WPF-Disabling-a-row-in-a-Grid-based-off-of-a-value-in-the-source.aspx that talks about using style triggers to turn the grid row on/off using binding. I cannot make this to work with my HierarchyChildTemplate control.
<
telerik:RadGridView
x:Name
=
"DetailsView"
CanUserFreezeColumns
=
"False"
CanUserDeleteRows
=
"True"
CanUserInsertRows
=
"True"
SelectionMode
=
"Single"
SelectionUnit
=
"FullRow"
AutoGenerateColumns
=
"False"
ShowInsertRow
=
"True"
ItemsSource
=
"{Binding ReceiptEditRows, Mode=OneWay}"
SelectedItem
=
"{Binding DataContext.SelectedRowViewModel, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
ShowGroupPanel
=
"False"
IsReadOnly
=
"False"
IsFilteringAllowed
=
"False"
>
<
telerik:RadGridView.Resources
>
<
Style
TargetType
=
"{x:Type telerik:GridViewRow}"
>
<
Setter
Property
=
"IsEnabled"
Value
=
"True"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Path=CanEditChildRow}"
Value
=
"True"
>
<
DataTrigger.Setters
>
<
Setter
Property
=
"IsEnabled"
Value
=
"True"
/>
</
DataTrigger.Setters
>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
telerik:RadGridView.Resources
>
<
telerik:RadGridView.Columns
>
Is this supposed to work?
Petar.