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

change default selected cell colour

3 Answers 19 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 07 Oct 2014, 09:54 AM
Is there a quick way to change the default selected cell colour from that light brown to whatever other colour I wish?

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 07 Oct 2014, 12:57 PM
Hello Chris,


Thank you for contacting us. 

You may predefine the template of GridViewCell and manipulate the visual element with x:Name Background_Selected, as proposed below:

<Border x:Name="Background_Selected" Margin="1 1 2 2" BorderThickness="1" CornerRadius="1"
                        BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                        Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed">
    <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}"
                        Background="{StaticResource ItemBackground_Selected}" />
</Border>

*the mark-up above is against the default Office_Black theme. 

You could also check our online documentation for further reference. 

Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Chris
Top achievements
Rank 1
answered on 07 Oct 2014, 01:04 PM
Thank you for the response. I have read the articles, but where do I put the border element? within the radgridview element?
0
Vanya Pavlova
Telerik team
answered on 07 Oct 2014, 01:24 PM
Hello Chris,


Thank you for getting back to us. 

Background_Selected element is part of the template of GridViewCell, located within Telerik.Windows.Controls.GridView.xaml. 

I'm attaching you small sample demo, which illustrates how to modify this element against Office_Black theme. Microsoft Expression Blend image preview is included, as well. 

Please take a look at this demo and let me know how I can assist you further. 


Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Chris
Top achievements
Rank 1
Share this question
or