This is a migrated thread and some comments may be shown as answers.

Disable focus on a WPF Telerik RadGrid Row

3 Answers 398 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ruhban
Top achievements
Rank 1
Ruhban asked on 04 Mar 2011, 08:52 AM

Hello

I have a WPF Telerik RadGrid View, in which the row should have different colors based on a boolean. i was able to do this with data triggers, but the problem is that i was unable to disable the mouse over and select effects on the row. as a result, even though a particular row has a different color due to the boolean, when the mouse moves over or when the row is selected, it gets selected/mouse over color effect. is tere a way i can disable the mouse over and selected properties for this particular row. Setting the IsSelected and Focusable properties to false also didnt make any difference. The style and data triggers is as follows:

<Style x:Key="RadRowStyle" TargetType="{x:Type telerik:GridViewRow}"> 
           
<Style.Triggers> 
               
<DataTrigger Binding="{Binding ABC}" Value="True"> 
               
<Setter Property="Background" Value="Blue"/> 
               
<Setter Property="IsSelected" Value="False"/> 
               
<Setter Property="Focusable" Value="False"/> 
               
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> 
           
</DataTrigger> 
           
<DataTrigger Binding="{Binding ABC}" Value="false"> 
               
<Setter Property="Background" Value="Transparent"/> 
           
</DataTrigger> 
       
</Style.Triggers> 
   
</Style> 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Mar 2011, 09:51 AM
Hi,

 Why not use the approach demonstrated on this demo instead? 

Kind regards,
Vlad
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ruhban
Top achievements
Rank 1
answered on 04 Mar 2011, 06:30 PM
Hello Vlad,

Thanx for the demo. In this demo too, though the background color of a particular row is changed, the mouse over and select effects still remain. Is it possible to disable these effects?
0
Vlad
Telerik team
answered on 07 Mar 2011, 08:24 AM
Hello,

 You can edit GridViewRow template with Blend and remove unneeded states. 

Kind regards,
Vlad
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Ruhban
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ruhban
Top achievements
Rank 1
Share this question
or