[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Datalist question

Posted on 2006-12-01
7
Medium Priority
?
438 Views
Last Modified: 2010-04-16
I am working with the following datalist and it's giving me a problem.  


    <asp:Datalist ID="dlBB" align="center" Width="95%" OnItemCreated="DataList_ItemCreated" runat="server">
        <HeaderTemplate>
            <table class="bordered" cellpadding="2" cellspacing="0" width="100%">
            <tr class="header_row">
                <th colspan="3" class="h_12">Blackberry</th>
            </tr>
            <tr class="subheader_row">
                <th class="b_9" width="250">Device Count</th>
                <th class="b_9" colspan="2">Hierarchy</th>
            </tr>
        </HeaderTemplate>
       
        <ItemTemplate>
            <tr onmouseover="style.backgroundColor='#FFFFCC'" onmouseout="style.backgroundColor=''">
                <td class="r_10" width="100"><%# Container.Dataitem("DeviceCount")%>&nbsp;</td>
                <td class="r_10" colspan="2"><%#CommonFunctions.CommonFunctions.GetHierarchy(Container.DataItem("Hierarchy"))%>&nbsp;</td>
            </tr>
        </ItemTemplate>
       
       <FooterTemplate>
            <tr>
              <td>
                  <asp:Label ID="lblBBTotal" CssClass="b_10" runat="server" />
              </td>
              <td colspan="2" align="right">
                <a class="reglink" href="HierarchyReport.aspx?vendor=<%=lblVendor.text%>&action=HierarchyReportBB" target="_blank">Download Excel Report</a>
              </td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Datalist>


For whatever reason, it's putting an extra <td> tag around the <itemtemplate>, like such:
<tr><td>
            --contents of the item template
                <td class="r_10" width="100">1&nbsp;</td>
                <td class="r_10" colspan="2">F - TS & F&nbsp;</td>
 </td></tr>

It's screwing up my css and driving me nuts.  Any thoughts?

Thanks,

N
0
Comment
Question by:stretch73
6 Comments
 
LVL 4

Expert Comment

by:hclgroup
ID: 18056034
In what way is it messing with your CSS?
0
 

Author Comment

by:stretch73
ID: 18056074
It's making the border double as thick as it is supposed to be
0
 
LVL 2

Expert Comment

by:AmNoGeek
ID: 18056715
Is the cellpadding="2" causing it?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:stretch73
ID: 18096604
Changing the cellpadding didn't change anything.  I think it's something to do with the way the Datalist generates HTML.  I changed one of the datalists to a repeater control and it worked fine.
0
 

Author Comment

by:stretch73
ID: 18103292
In the interest of time, I just changed all of the datalists to repeater controls which seems to have fixed the problem.  Apparently it renders HTML differently which is why I was getting extra tags.
0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 18135868
Question closed - 250 points refunded.

Best regards,
RomMod
Experts Exchange
Community Support Moderator
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Screencast - Getting to Know the Pipeline

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question