DataList Formatting

C

Chris Kennedy

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>
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top