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

RadGridView - Issue with Background color property on mouse over

3 Answers 428 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vaibhav
Top achievements
Rank 1
Vaibhav asked on 05 May 2011, 02:50 PM

Dear Telerik Team,

I am using telerik Rad Grid View control and having issue with below code.

I am trying to set the background color of a row on mouse over.

Issue is On mouse over below Setter property 'Background' does not set the background color of the row instead it sets the border color. Pl advise on the correct Implementation.

<telerik:RadGridView x:Name="radGridView" Margin="8,100,0,0"
                            ItemsSource="{Binding Source={StaticResource AuthorsData}}"
                           IsFilteringAllowed="True"
                           AutoGenerateColumns="True" Grid.Column="1" >
            <telerik:RadGridView.RowStyle>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="MinHeight" Value="20"/>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="Green"/>
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </telerik:RadGridView.RowStyle>
        </telerik:RadGridView>

Thanks,
Vaibhav.

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 05 May 2011, 03:02 PM
Hi Vaibhav,

 

Due to the template structire of GridViewRow you cannot change the background of a row in any of its States using a simple style. You may alter its appearance by editing the template of GridViewRow and modify the brushes used by the Border element named Background_Over, please refer to the following online help article.


All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jon
Top achievements
Rank 1
answered on 11 Sep 2020, 10:24 AM

The link is broken, please provide an updated link to the article.

Thanks

0
Dilyan Traykov
Telerik team
answered on 11 Sep 2020, 11:07 AM

Hello Jon,

The information from the article my colleague Vanya shared can now be found in the following two articles:

Modifying Default Styles
-
 Styling Rows

I
 hope you find these resources helpful for achieving your requirement.

Regards,
Dilyan Traykov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
GridView
Asked by
Vaibhav
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Jon
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or