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

Changing the background telerik:RadGridView while binding the data

5 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kasthuri
Top achievements
Rank 1
Kasthuri asked on 09 Mar 2012, 06:17 AM
Hi Support team,

                         I am having really a hard time in changing the background color of the telerik:RadGridView.
I can see option in blend to change the background color when i change it.It loaded the changed color for while one data are loaded into the grid it again change back to default white color.This is the code i use.

      " <telerik:RadGridView Margin="46,262,53,32" Name="raddgvGlobalCountryList" ItemsSource="{Binding }" CanUserSortColumns="True" CanUserReorderColumns="True" CanUserResizeColumns="True" ShowGroupPanel="False" GridLinesVisibility="None"   />"

and i also attached a clear image for your future reference pls do help ASAP.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Mar 2012, 01:57 PM
Hi,

 In the pasted XAML there is no setting for background. Can you post more info where you've set this?

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Kasthuri
Top achievements
Rank 1
answered on 10 Mar 2012, 04:58 AM
Hi Team,

              " <telerik:RadGridView Margin="46,262,53,32" Name="raddgvGlobalCountryList" ItemsSource="{Binding }" CanUserSortColumns="True" CanUserReorderColumns="True" CanUserResizeColumns="True" ShowGroupPanel="False" GridLinesVisibility="None" Background="#FF438068"   />"

here this xaml.Actually Am trying to create style where I am looking for background.And i trying to change the mouse over color of the header.The default yellow into white.



Thank & regards
Velukarthick U

0
Vlad
Telerik team
answered on 12 Mar 2012, 08:12 AM
Hello,

Have you tried to restyle the header cell using Blend in the way you want? You can check our documentation for more info about how to use Blend to change various grid templates. 

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Kasthuri
Top achievements
Rank 1
answered on 12 Mar 2012, 10:32 AM
Hi

     Yes I tried in blend also I have attached A clear image pls have a look.Actually am trying to create style for the all over application using blend.For that I have edited the radgridview in blend and changed the background but in runtime It goes back to default white color.Also I couldnt find a option to change grid header mouse over color.I  hope u would understand my problem now.Pls help me ASAP.
0
Vanya Pavlova
Telerik team
answered on 15 Mar 2012, 09:18 AM
Hello Kasthuri,


Generally the recommended approach to change the background of the grid is to generate a simple style targeted at RadGridView and set its Background within inline Style Setter. I have tried to change the background as you mentioned however in runtime the background is applied to. Regarding your question about column headers you should predefine the template of GridViewHeaderCell and modify the elements which appeared in the corresponding state of the header cell (Background_Over, Background_Selected etc..). You may run through our online documenation for further reference. 




All the best,
Vanya Pavlova
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Kasthuri
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Kasthuri
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or