HI,
My grid view contains number of rows and one column in the grid view contains a list box.
I am using the below code to change the color of textblock placed inside the list box based on its parent grid view row.
Though its working fine but i want one more condition in this trigger to check wheather Parent grid view selected row's selection is active or not.For that i modified condition inside the trigger as mentioned below:
<MultiDataTrigger>
<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:GridViewRow}}, Path=IsSelected}" Value="true"/>
<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:GridViewRow}}, Path=Selector.IsSelectionActive}" Value="true"/>
</MultiDataTrigger>
But its not working. Can you please suggest which approach to use to get parent row's Selector.IsSelectionActive property.
Looking forward for your reply.
Thanks And Regards,
Kavita
My grid view contains number of rows and one column in the grid view contains a list box.
I am using the below code to change the color of textblock placed inside the list box based on its parent grid view row.
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:GridViewRow}}, Path=IsSelected}" Value="True">
<Setter Property="Foreground" Value="White" />
</DataTrigger>
</Style.Triggers>
</Style>
Though its working fine but i want one more condition in this trigger to check wheather Parent grid view selected row's selection is active or not.For that i modified condition inside the trigger as mentioned below:
<MultiDataTrigger>
<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:GridViewRow}}, Path=IsSelected}" Value="true"/>
<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:GridViewRow}}, Path=Selector.IsSelectionActive}" Value="true"/>
</MultiDataTrigger>
But its not working. Can you please suggest which approach to use to get parent row's Selector.IsSelectionActive property.
Looking forward for your reply.
Thanks And Regards,
Kavita