This question is locked. New answers and comments are not allowed.
Dave Aronow
Top achievements
Rank 1
Dave Aronow
asked on 07 Mar 2012, 03:26 PM
I am trying to make the radGridView GridViewIndentCell background match the background of the row itself (White) and based on a sample I found in the forums I applied the following in the XAML (see below). In Expression Blend this appears to work as it does appear correctly in the design preview with the white background applied. In Visual Studio 2010 ReSharper grays it out saying it is never used but in the design preview of the grid does apply the background. However when I deploy the code it doesn't work and I get the themed background.
Is there some other way to apply this background?
Thanks.
Dave
Is there some other way to apply this background?
Thanks.
Dave
<
UserControl.Resources
>
<
Style
TargetType
=
"telerik:GridViewIndentCell"
>
<
Setter
Property
=
"Background"
Value
=
"White"
/>
</
Style
>
</
UserControl.Resources
>
5 Answers, 1 is accepted
0
Hello,
Didie
the Telerik team
Indeed this is the style that should be applied. Would you please let me know if you have applied some theme different from the default one? If yes, then can you please give us details about that theme? It would be even better if you could send us a simple project showing your case.
Didie
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
Dave Aronow
Top achievements
Rank 1
answered on 08 Mar 2012, 05:59 PM
I am applying the Windows 7 theme for the whole page using the method I found somewhere on the telerik site:
StyleManager.ApplicationTheme = new Windows7Theme();
This is the first line executed in the constructor of my main page. I tried removing it, now the theme is gone (the default theme is back) but that cell is still filled in (just in a different color).
StyleManager.ApplicationTheme = new Windows7Theme();
This is the first line executed in the constructor of my main page. I tried removing it, now the theme is gone (the default theme is back) but that cell is still filled in (just in a different color).
0
Hi,
Didie
the Telerik team
Thank you for that additional information. We have investigated this issue and I can confirm it as a bug.
As a workaround you can try to create your custom theme as explained in this help article.
Didie
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
Dave Aronow
Top achievements
Rank 1
answered on 13 Mar 2012, 01:06 PM
Before I head down that road would it be possible to workaround the bug by applying the style in code in say the onload event of the page or a different event when the grid is bound? Without knowing where the bug is I don't want to waste time trying these if they are guaranteed to fail....
Thanks.
Dave
Thanks.
Dave
0
Hello Dave,
Didie
the Telerik team
Unfortunately you cannot apply this style after the rows are loaded. When you create a custom theme, then you can set your own style for the GridViewIndentCell. Now your defined style is overridden by the style defined inside the Windows7 Theme.
Regards,Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>