Solved

one of the item in datalist misaligned

Posted on 2010-11-14
3
397 Views
Last Modified: 2012-05-10
one of the item in the datalist has misaligned (as shown in attached pic), and mostly it occurs during first load. Sometimes it is ok when second or third load.



 
<div style="padding-left:50px;">

                                            <asp:Datalist ID="dlarticle" runat="server" Height="33px" Width="800px" 

                                                    onitemdatabound="dlarticle_ItemDataBound" 

                                                    onitemcommand="dlarticle_ItemCommand">

                                                          <ItemTemplate>

                                                          <fieldset>

                                                                <table>

	                                                            <colgroup>

	                                                            <col width=200 valign=top>

	                                                            <col width=400 valign=top>

                                                                <col width=150 valign=top>

	                                                            <col width=150 valign=top>

	                                                            <col width=150 valign=top>

	                                                            </colgroup>

	                                                            <tr>

		                                                            <td class="datalisttitlefont">Category</td>

		                                                            <td class="datalisttitlefont">Description</td>

                                                                    <td class="datalisttitlefont">Total</td>

		                                                            <td class="datalisttitlefont">View</td>

                                                                    <td class="datalisttitlefont">Create</td>

		                                                            

	                                                            <tr>

	                                                            <tr>

		                                                            <td class="datalistcontentfont"><%# DataBinder.Eval(Container.DataItem, "a_categoryname")  %></td>

		                                                            <td class="datalistcontentfont"><%# DataBinder.Eval(Container.DataItem, "a_desc") %></td>

                                                                    <td><asp:Label ID="lblTotal" runat="server" /></td>

		                                                            <td>

                                                                    <ItemTemplate>

                                                                     <asp:Label ID="lblid" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "id") %>' Visible="false" />  



                                                                                <asp:LinkButton ID="lbViewPost" runat="server" 

                                                                                CommandName="VIEWPOST" CssClass="note" CommandArgument='<%#

                                                                                DataBinder.Eval(Container.DataItem, "id") %>'></asp:LinkButton>

                                                                    </ItemTemplate>

                                                                    

                                                                    </td>

		                                                            <td>

                                                                     <ItemTemplate>

                                                                    

                                                                                <asp:LinkButton ID="lbCreatePost" runat="server" 

                                                                                CommandName="CREATEPOST" CssClass="editnote" CommandArgument='<%#

                                                                                DataBinder.Eval(Container.DataItem, "id") %>'></asp:LinkButton>

                                                                    </ItemTemplate>

                                                                    </td>

	                                                            <tr>

	                                                           

                                                            </table>

 





                                                                  



                                                             </fieldset>

                                                           </ItemTemplate>

                                                        </asp:Datalist>

                                            </div>

Open in new window

misalign-item-datalist.jpg
0
Comment
Question by:doramail05
  • 2
3 Comments
 
LVL 13

Expert Comment

by:devlab2012
ID: 34133732
In the following section of your code:
<table>
      <colgroup>
             <col width=200 valign=top>
            <col width=400 valign=top>

give fixed width in <table> tag like <table width="800">
0
 
LVL 1

Accepted Solution

by:
doramail05 earned 0 total points
ID: 34133896

have like <td style="white-space : nowrap;" .. >

it seems like the problem went off,

but sometimes it came out like a 'not ready' page which makes the page look weird. Until refresh is pressed and page reloaded correctly.
0
 
LVL 1

Author Closing Comment

by:doramail05
ID: 34237318
solved already at this time
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to set checkbox values for checked or not checked 3 28
Hovering effect 9 29
Menu Inconsistent 3 20
Hidden Field Value 10 34
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now