|
||||||
| ASP, ASP.NET and Coldfusion Microsoft's Web Development Language (ASP/ASP.NET) and Coldfusion discussion |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I am fairly new to .Net so my appologises if this is a stupid question:
I have just created a datalist with a dataset that is populated. I am having trouble getting the stylesheet parameters recognized. Code:
<asp:DataList ID="DataList1" runat="server" CssClass="DefaultClass"> If I try the following it does not work: Code:
<asp:DataList ID="DataList1" runat="server"
HeaderStyle-CssClass="DefaultHeaderRow"
AlternatingItemStyle-CssClass="DefaultAltDetailRow"
ItemStyle-CssClass="DefaultDetailRow"
SelectedItemStyle-CssClass="DefaultDetailRow"
OnSelectedIndexChanged="DataList1_SelectedIndexChanged" >
I have also tried setting a base stylesheet and overriding each section with another stylesheet - Code:
<asp:DataList ID="DataList1" runat="server" CssClass="DefaultHeaderRowTest"
OnSelectedIndexChanged="DataList1_SelectedIndexChanged" >
<HeaderStyle CssClass="DefaultHeaderRow" />
<ItemStyle CssClass="DefaultAltDetailRow" />
<AlternatingItemStyle CssClass="DefaultAltDetailRow" />
<HeaderTemplate>
Any help would be greatly appreciated by this newbie... Thanks. SB EDIT: Added code tags around code so smilies don't appear Last edited by Jordan; 07-21-2006 at 03:28 PM. |
| Sponsored Links |
|
|
|
|||||
|
Have you tried just doing something like:
Code:
<asp:DataList id="DataList1" runat="server" cellpadding="2" cellspacing="2" borderstyle="inset" backcolor="#e8e8e8" width="100%" headerstyle-font-name="Verdana" headerstyle-font-size="12pt" headerstyle-horizontalalign="center" headerstyle-font-bold="True" itemstyle-backcolor="#778899" itemstyle-forecolor="#ffffff" alternatingitemstyle-backcolor="#e8e8e8" alternatingitemstyle-forecolor="#000000" footerstyle-font-size="9pt" footerstyle-font-italic="True">
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||
|
Thanks Jordan but I dont think the issue was really whether they were in a stylesheet or not. I was able to get it close by adding tables within each template tag,
Ex. <HeaderTemplate> <table> <tr > <td width="21%" align="left">Domain</td> <td width="20%" align="left">Pre2K</td> <td width="40%" align="left">Scope</td> <td width="18%" align="left">Members</td> </tr> <tr > <td colspan="4">AD Path</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table> .... </table> </ItemTemplate> The problem I now have is that I always have to play with the column widths in both the headers and the rows to get them to match up. By not being in the same table I couldnt get them to always be the same width. Any other thoughts? Thanks. SB |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 65%