DataList Formatting

Discussion in 'ASP .Net Web Controls' started by Chris Kennedy, Jun 22, 2004.

  1. I have a datalist in which I have the data bound in the HTML. I want to
    utilise the functionality of the selected style property. The HTML below
    does this. I can't figure out how to space the HTML into nicely formatted
    columns. If I use tables the formatting of the text disappears, applying a
    stylesheet to the item style with padding merely move the whole lot over not
    the individual items. Can anyone point me in the right direction? Regards,
    Chris.



    <asp:DataList id="DataList1" runat="server" Width="526px" Height="44">



    <HeaderTemplate>

    <asp:Label id="Label1" runat="server">TimeSheetID</asp:Label>

    <asp:Label id="Label2" runat="server">Job Description</asp:Label>

    <asp:Label id="Label4" runat="server">Duration</asp:Label>

    <asp:Label id="Label5" runat="server">Start Date</asp:Label>



    </HeaderTemplate>

    <ItemStyle Font-Bold="True" ForeColor="Black"
    BackColor="White"></SelectedItemStyle>

    <SelectedItemStyle Font-Bold="True" ForeColor="White"
    BackColor="SteelBlue"></SelectedItemStyle>

    <ItemTemplate>

    <%# Databinder.eval(Container,"DataItem.tsheetid") %>

    <%# Databinder.eval(Container,"DataItem.jobdesc") %>

    <%# Databinder.eval(Container,"DataItem.duration") %>

    <%# Databinder.eval(Container,"DataItem.startdate") %>

    asp:LinkButton id="lnkTsheetid" runat="server" CssClass="stdtext">Get
    Timesheet Details</asp:LinkButton>

    </ItemTemplate>



    </asp:DataList>
    Chris Kennedy, Jun 22, 2004
    #1
    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. Joe
    Replies:
    3
    Views:
    459
  2. Leo Duran
    Replies:
    2
    Views:
    3,434
  3. Moe Sizlak

    formatting the display of a datalist?

    Moe Sizlak, Aug 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    495
    Moe Sizlak
    Aug 2, 2004
  4. Davide Vernole [MVP]

    Re: datalist formatting

    Davide Vernole [MVP], Sep 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    362
    Davide Vernole [MVP]
    Sep 7, 2004
  5. Nevyn Twyll
    Replies:
    8
    Views:
    1,849
Loading...

Share This Page