HI team,
I need to add theme to my silverlight grid , i tried the below code but am getting the following error.
"The attached property theme was not found in the StyleManager."
i included this namespace:
xmlns
:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
<telerik:RadGridView x:Name="RadGridView1" telerik:StyleManager.Theme="Office_Blue" AutoGenerateColumns="False">
my grid version is :2009.1.312.1020
-shinu.
9 Answers, 1 is accepted
Office_Blue and Office_Silver themes are available since our Q2 release.
That' is why you are getting that error.
Regards,
Anastasia
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
so which theme I can use with this version?
i need a blue grid , can i use vista theme?
And also do i need to refer any namespace for using this " telerik:StyleManager.Theme"
because am getting error on this line
-shinu
Vista theme is available in our Q1 release, so I think that it might be suitable in your case.
You will need to refer to this namespace:
xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" <telerik:RadGridView x:Name="RadGridView1" controls:StyleManager.Theme="Vista"/>Kind regards,
Anastasia
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
it seems like i cant set controls:StyleManager.Theme="Vista" this directly
i imported this namespace :
xmlns
:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
and here is my grid declaration
<telerikGridView:RadGridView x:Name="rgvUnmappedAccounts"
controls:StyleManager.Theme="Vista"
I'm getting this error
AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 73 Position: 74] --- Inner Exception --- The given key was not present in the dictionary.
-shinu
Do you have a reference to the Vista theme assembly (Telerik.Windows.Themes.Vista.dll) in your project?
Also to what namespace refers "telerikGridView"?
It should be:
<.... xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" ...> <telerikGridView:RadGridView x:Name="rgvUnmappedAccounts" controls:StyleManager.Theme="Vista" />Best wishes,
Anastasia
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
telerikGridView refer to this assembly xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
from where do i get the Vista theme assembly (Telerik.Windows.Themes.Vista.dll) ??
====
I tried setting the theme from code behind also
i have VistaTheme and summertheme available in the assemly
Public Sub New()
Telerik.Windows.Controls.StyleManager.SetTheme(rgvKnowledgeAccounts,
New VistaTheme())
InitializeComponent()
End Sub
but it is not setting and am getting this error "Object reference not set to an instance of an object."
-shinu.
Setting Vista theme to the RadGridView is working fine on my end - please take a look at the attached sample project.
Maybe you can configure my sample project so that it behaves like your project and attach it back so we can debug it localy.
Regards,
Anastasia
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
thanks for the sample code, it really helps.
-shinu