formatting the display of a datalist?

M

Moe Sizlak

Hi There,

I am wanting to format a datalist into columns, so do I need to use a table
rows & columns? or can I use templates and a property at the top of the list
itself ? It seems that when I try to format the datalist I can't get it to
look like a normal html table.

Moe

row1 = col1 col2 col3 col4 col 5
row2 = col1 col2 col3 col4 col 5


<asp:DataList id="modify_listings"
runat="server"
headerstyle-font-name="Verdana"
cellpadding="10"
cellspacing="10"
GridLines="Both"
headerstyle-font-size="12pt"
headerstyle-horizontalalign="center"
headerstyle-font-bold="true"
itemstyle-backcolor="#778899"
itemstyle-forecolor="#ffffff"
footerstyle-font-size="9pt"
footerstyle-font-italic="true"
ShowHeader="true">

<HeaderTemplate>

<b> List</b>


</HeaderTemplate>

<ItemTemplate>

<asp:HyperLink id="HyperLink3"
style="font-size:xxsmall" Text='Modify' NavigateUrl='<%#
"edit_listings.aspx?ListingID=" & DataBinder.Eval(Container.DataItem,
"ListingID")%>' runat="server" /><br />

<%# DataBinder.Eval(Container.DataItem,
"listprice","{0:c}")%><br />

<%# DataBinder.Eval(Container.DataItem,
"manufacturer") %><br />

<%# DataBinder.Eval(Container.DataItem,
"listeddate","{0:dd-MM-yy}") %><br />

<%# DataBinder.Eval(Container.DataItem,
"formname") %><br />
<%# DataBinder.Eval(Container.DataItem,
"status") %><br />
<asp:HyperLink id="HyperLink1"
style="font-size:xxsmall" Text='Item Sold?' NavigateUrl='<%#
"processrequest.aspx?I=1&ListingID=" & DataBinder.Eval(Container.DataItem,
"ListingID")%>' runat="server" />

</ItemTemplate>
</asp:DataList>
 
S

S. Justin Gengo

Moe,

Is Mr. Clothesoff there? First name Oliver.

You can certainly format the datalist into columns, but it will be a lot
easier to just use a datagrid since it places all the data into columns by
default.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
M

Moe Sizlak

Hi Justin,

he he another Simpson's fan good to see. Thanks for that I didn't realise a
datagrid would work with what I have done but it does!!

Moe
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top