Changing the background telerik:RadGridView while binding the data

6 posts, 0 answers
  1. Kasthuri
    Kasthuri avatar
    25 posts
    Member since:
    Aug 2011

    Posted 09 Mar 2012 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Mar 2012 Link to this post

    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 >>
  3. Kasthuri
    Kasthuri avatar
    25 posts
    Member since:
    Aug 2011

    Posted 09 Mar 2012 Link to this post

    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

  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 12 Mar 2012 Link to this post

    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 >>
  5. Kasthuri
    Kasthuri avatar
    25 posts
    Member since:
    Aug 2011

    Posted 12 Mar 2012 Link to this post

    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.
  6. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 15 Mar 2012 Link to this post

    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 >>
Back to Top