I'm trying to override the grid header background color as well as the row selected color. I added this code:
<style type="text/css">
td.GridHeader_Web20 input
{
background:#133926;
}
.SelectedRow_Web20
{
background:#b7e2c6;
}
</style>
I must be missng something. Can you help me out?
Thanks,
Susan
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 02 May 2008, 05:06 AM
Hi Susan,
Try setting the BackColor for the GridHeader in the code behind as shown below.
CS:
Thanks
Shinu.
Try setting the BackColor for the GridHeader in the code behind as shown below.
CS:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridHeaderItem) |
{ |
GridHeaderItem header = (GridHeaderItem)e.Item; |
header.BackColor = System.Drawing.Color.Red; |
} |
} |
Thanks
Shinu.
0
Susan
Top achievements
Rank 1
answered on 02 May 2008, 11:49 AM
I am using Prometheus. I don't seem to have a 'griditemeventargs' available. Am I doing something wrong???
Thanks,
Susan
Thanks,
Susan
0
Princy
Top achievements
Rank 2
answered on 02 May 2008, 12:40 PM
Hi,
Go through the following help document links.
Conditional Formatting for rows/cells on ItemDataBound
Customizing row appearance
Princy.
Go through the following help document links.
Conditional Formatting for rows/cells on ItemDataBound
Customizing row appearance
Princy.
0
Susan
Top achievements
Rank 1
answered on 04 May 2008, 08:27 PM
This is what I have. It is still not changing the background color of the grid header.
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
If (TypeOf (e.Item) Is Telerik.Web.UI.GridHeaderItem) Then
e.Item.BackColor = system.Drawing.Color.Green
End If
End Sub
Thanks,
Susan
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
If (TypeOf (e.Item) Is Telerik.Web.UI.GridHeaderItem) Then
e.Item.BackColor = system.Drawing.Color.Green
End If
End Sub
Thanks,
Susan
0
Shinu
Top achievements
Rank 2
answered on 05 May 2008, 04:08 AM
Hi Susan,
Try setting the Grid Skin to None.
ASPX:
Shinu.
Try setting the Grid Skin to None.
ASPX:
<rad:radgrid id="RadGrid1" runat="server" Skin="None" > |
Shinu.