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

[Solved] Theme not been applied for RadGridView

3 Answers 376 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rohit
Top achievements
Rank 1
Rohit asked on 30 Apr 2009, 02:39 PM
Hello,

We have set the application level theme by using the following statement

StyleManager

 

.ApplicationTheme = ThemeManager.FromName("Summer");

Now we want to change the theme for RadGridView on one usercontrol to office_black, please suggest how can we override the application level theme just for one control.
We have tried to use StyleManager.SetTheme(radGridView1, new Office_BlackTheme()) but could not succeed.

Another question is how can we change the background color of header row of RadGridView control.

Regards
Rohit Shrivastava

 

3 Answers, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 04 May 2009, 09:22 AM
Hello Rohit,

To change the theme of a RadGridView in Silverlight you will need to do the following:
  1. Add reference to the theme DLL file:
    Telerik.Windows.Themes.Office_Black.dll
  2. Register the following namespaces:
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
  3. Set the theme:
    <telerikGridView:RadGridView x:Name="RadGridView1" telerik:Theming.Theme="Office_Black"/>

I hope this will work for you.

Regards,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Rohit
Top achievements
Rank 1
answered on 13 May 2009, 12:13 PM
Proposed solution does not work if StyleManager.ApplicationTheme = ThemeManager.FromName("Summer"); is set application wide. I mean to say if we set the ApplicationTheme then I am not able to apply office black on rad grid in my application.
0
Hristo Deshev
Telerik team
answered on 18 May 2009, 09:36 AM
Hi Rohit,

I did a small investigation on my end, and I found out this is a bug in the control. There is a built-in optimization that incorrectly prevents the default theme from applying (Office_Black is the default theme).

We will get this fixed for our service pack that will go live later this week. Thanks for the report! I have updated your Telerik points.

All the best,
Hristo Deshev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Rohit
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Rohit
Top achievements
Rank 1
Hristo Deshev
Telerik team
Share this question
or