Hi all,
I'm having a custom skin which is modified from Telerik Skin.
In my website, user has his/her own favorite color. And I would like to apply that color for Grid header.
For example, user A has Orange color and the background color of RadGrid header must be orange.
Are there any ways to modify the "MySkin"?
Regards,
Andy.
I'm having a custom skin which is modified from Telerik Skin.
EnableEmbeddedSkins="false" Skin="MySkin"
In my website, user has his/her own favorite color. And I would like to apply that color for Grid header.
For example, user A has Orange color and the background color of RadGrid header must be orange.
Are there any ways to modify the "MySkin"?
Regards,
Andy.
EnableEmbeddedSkins="false" Skin="MySkin"
6 Answers, 1 is accepted
0
Hi Andy,
Try using the code snippet below to override the background image and replace it with a color of your choice:
CSS:
Give it a try and let me know how it goes.
Greetings,
Pavlina
the Telerik team
Try using the code snippet below to override the background image and replace it with a color of your choice:
CSS:
<style type=
"text/css"
>
div.RadGrid_MySkin th.rgHeader
{
background-image
:
none
;
background-color
:
#ba000c
;
}
</style>
Give it a try and let me know how it goes.
Greetings,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Andy
Top achievements
Rank 1
answered on 07 Jan 2011, 01:04 AM
Hi Pavlina,
Thanks for your response.
I don't think that code can solve my problem, Pavlina.
I already have a custom skin all the users share together. In that, it defines the border color, filter color, edit mode color, etc.
They just have one different thing is header background color.
And I don't want to create one CSS for each user. My purpose is using one CSS for all users and overwrite header background color in the server code depends on specific user.
Thanks.
Andy.
Thanks for your response.
I don't think that code can solve my problem, Pavlina.
I already have a custom skin all the users share together. In that, it defines the border color, filter color, edit mode color, etc.
They just have one different thing is header background color.
And I don't want to create one CSS for each user. My purpose is using one CSS for all users and overwrite header background color in the server code depends on specific user.
Thanks.
Andy.
0
Hi Andy,
To achieve your goal you need to remove the background image from header cells as shown below:
and then to set HeaderStyle-BackColor programmatically for each user.
Best wishes,
Pavlina
the Telerik team
To achieve your goal you need to remove the background image from header cells as shown below:
<style type=
"text/css"
>
div.RadGrid_MySkin th.rgHeader
{
background-image
:
none
;
}
</style>
and then to set HeaderStyle-BackColor programmatically for each user.
Best wishes,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Hi Andy,
To achieve your goal you need to remove the background image from header cells as shown below:
and then to set HeaderStyle-BackColor programmatically for each user.
Best wishes,
Pavlina
the Telerik team
To achieve your goal you need to remove the background image from header cells as shown below:
<style type=
"text/css"
>
div.RadGrid_MySkin th.rgHeader
{
background-image
:
none
;
}
</style>
and then to set HeaderStyle-BackColor programmatically for each user.
Best wishes,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Andy
Top achievements
Rank 1
answered on 07 Jan 2011, 05:02 PM
Hi Pavlina,
That's what I need.
Thanks for your help.
Here is the code for changing header background color if someone needs
Andy.
That's what I need.
Thanks for your help.
Here is the code for changing header background color if someone needs
Protected
Sub
dgList_ItemDataBound(
ByVal
sender
As
System.
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
dgList.ItemDataBound
If
TypeOf
e.Item
Is
GridHeaderItem
Then
Dim
header
As
GridHeaderItem =
DirectCast
(e.Item, GridHeaderItem)
header.BackColor = Color.Violet
End
If
End
Sub
Andy.
0
Hello Andy,
I am glad I could help in your implementation. Please do not hesitate to let us know if you need additional assistance.
Greetings,
Pavlina
the Telerik team
I am glad I could help in your implementation. Please do not hesitate to let us know if you need additional assistance.
Greetings,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.