all groups > asp.net > march 2007 >
You're in the

asp.net

group:

ItemTemplate/AlternativeItemTemplate & Skin


ItemTemplate/AlternativeItemTemplate & Skin Jeff
3/5/2007 11:44:11 PM
asp.net:
Dear reader :-)

ASP.NET 2.0

I have a GridView on my webpage. The ItemTemplate and
AlternativeItemTemplate should have different background color.

I've tryed this technique which don't help at all, it only displays
backgorund color for the label control, it doesn't fill the entire
ItemTemplate
<ItemTemplate>
<div style="background-color:#eeEEdd; width:100%; height:100%;">
<asp:Label ID="Fullname" runat="server" Text=""></asp:Label>
</div>
</ItemTemplate>

The GridView have 2 columns: first column is 160px wide and the second fills
up the rest of the column... Width is NOT fixed, the GridView is as wide as
the webpage...

I would like to specify the background color of ItemTemplate &
AlternativeItemTemplate in skin files because the user is able to select
themes he wants, so then it would be great if the background color also
changes depending on theme. So would be great if someone could explain me
how to specify the background color ItemTemplate & AlternativeItemTemplate
in skin files...

Any suggestions?

Jeff

Re: ItemTemplate/AlternativeItemTemplate & Skin Jeff
3/6/2007 1:37:26 AM
solved, used AlternativeRowItemStyle and RowItemStyle.. maybe it was
without "Item"

[quoted text, click to view]

AddThis Social Bookmark Button