DataList Indentation

Discussion in 'ASP .Net' started by SJ, Nov 3, 2005.

  1. SJ

    SJ Guest

    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
     
    SJ, Nov 3, 2005
    #1
    1. Advertising

  2. 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
    "SJ" <> wrote in message
    news:%Ugaf.7553$...
    > 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. Justin Gengo, Nov 3, 2005
    #2
    1. Advertising

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

    "S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
    message news:e%...
    > 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
    > "SJ" <> wrote in message
    > news:%Ugaf.7553$...
    > > 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
    > >
    > >

    >
    >
     
    Patrick.O.Ige, Nov 4, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gönen EREN

    Datalist in Datalist How?

    Gönen EREN, Aug 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    413
    Gönen EREN
    Aug 22, 2003
  2. acko bogicevic

    DataList in DataList

    acko bogicevic, Nov 10, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    5,517
    acko bogicevic
    Nov 11, 2003
  3. Nevyn Twyll
    Replies:
    8
    Views:
    1,887
  4. SJ

    DataList Indentation

    SJ, Nov 3, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    104
    aa7im
    Nov 4, 2005
  5. Jesse B.
    Replies:
    2
    Views:
    195
    Josh Cheek
    Mar 27, 2010
Loading...

Share This Page