DataList Indentation

S

SJ

I'm using codebehind to populate my datalist, but having a lot of trouble
keeping the
indentation of the datalist in place. This is what i'm doing right now :

<asp:datalist id="LogList" Runat="server" width=150 Itemstyle-wrap=true>
<ItemTemplate>
<table cellSpacing="0" cellPadding="0" width="150" border="0"
class="bodytext">
<tr>
<td width="40">&nbsp;</td>
<td width="40" align="left">
<asp:checkbox id="chkbox" Runat="server"
Checked="False"></asp:checkbox></td>
<td align="left" width="30">
<asp:label id="VIP" Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"isVIP")%>'>
</asp:label></td>
<td align="left" width="40">
<asp:HyperLink ID="isVM" Runat=server
ImageUrl='<%#DataBinder.Eval(Container.DataItem,"isVM")%>'
NavigateUrl='<%#DataBinder.Eval(Container.DataItem,"vmURL")%>'>
</asp:HyperLink>
</td>
</tr>
</table>
</ItemTemplate>
</asp:datalist>

If I exceed the assigned width(40 in this case) of a column, instead of the
text wrapping to the next line,
the indentation goes totally crazy.

thanks,
-SJ
 
S

S. Justin Gengo

SJ,

Which column is causing the problem? It doesn't look like you're placing any
text in your checkbox and the only other column that is set to a width of 40
has an image in it not text.

An image will push out table boundries because it can't be wrapped...

Is that the column causing the trouble?

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
P

Patrick.O.Ige

Also adding to Justin's advice..
Set border="1"
That would also help you to see what you are doing wrong.
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top