I've got a RadGridView that contains a RowStyleSelector and an InputBindings section. The RowStyleSelector has 2 conditions, one checking if a value is true and one checking if a value is false. In the false case, the only thing being done is setting the style to be based on the existing GridViewRowStyle with no changes. In the true case, the same happens but the background color is changed. When the false case is used, my InputBindings work fine. Once the true case is used, though, my InputBindings stop working. (Related, I also use behaviors via Microsoft.Xaml.Behaviors.Wpf, with one of them being to bind a command to the MouseDoubleClick event, and that event also stops firing when the above happens with the InputBindings.)
I had set a breakpoint in my code to see if it the command was getting hit and it would only be hit when the false case happened above.
In the below example, assume that Items contains a Cond boolean property:
<
telerik:RadGridView
GroupRenderMode
=
"Flat"
IsReadOnly
=
"True"
IsSynchronizedWithCurrentItem
=
"True"
ItemsSource
=
"{Binding Items, Mode=OneWay}"
RowIndicatorVisibility
=
"Collapsed"
SelectedItem
=
"{Binding SelectedItem, Mode=TwoWay}"
ShowGroupPanel
=
"False"
>
<
telerik:RadGridView.RowStyleSelector
>
<
telerik:ConditionalStyleSelector
>
<
telerik:StyleRule
Condition
=
"Cond"
>
<
Style
BasedOn
=
"{StaticResource GridViewRowStyle}"
TargetType
=
"{x:Type telerik:GridViewRow}"
>
<
Setter
Property
=
"Background"
Value
=
"Orange"
/>
</
Style
>
</
telerik:StyleRule
>
<
telerik:StyleRule
Condition
=
"!Cond"
>
<
Style
BasedOn
=
"{StaticResource GridViewRowStyle}"
TargetType
=
"{x:Type telerik:GridViewRow}"
/>
</
telerik:StyleRule
>
</
telerik:ConditionalStyleSelector
>
</
telerik:RadGridView.RowStyleSelector
>
<
telerik:RadGridView.InputBindings
>
<
KeyBinding
Key
=
"Enter"
Command
=
"{Binding SelectItemCommand, Mode=OneTime}"
/>
<
KeyBinding
Key
=
"Tab"
Command
=
"{Binding SelectItemCommand, Mode=OneTime}"
/>
</
telerik:RadGridView.InputBindings
>
</
telerik:RadGridView
>