display mutiple rows data fields for single record

C

Chris

I would like to know how to display data column for a single record contains many fields. Likes the first row shows first 5 fields, 2nd row show next 5 fields, etc...
I tried to use datagrid, datalist and datarepeater and could not get it to work. Do you know a way to do it, if so, how do you bind data to it.

Lastname firstname midlle name id
xxxxxxx xxxxxxx xxx xxxxxx
Parent/Guardians address city zip
xxxxxxxxxxxxxxx xxxxxx xxxxxx



From http://www.developmentnow.com/g/8_2004_10_0_27_0/dotnet-framework-aspnet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
G

Guest

You should be able to do this by embedding HTML in a datalist. Here is an
example:

<asp:datalist id="Results" runat="server">
<HeaderTemplate>
<table border="1">
<tr>
<td>Field 1</td>
<td>Field 2</td>
<td>Field 3</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, ("Field1")) %></td>
<td><%# DataBinder.Eval(Container.DataItem, ("Field2")) %></td>
<td><%# DataBinder.Eval(Container.DataItem, ("Field3")) %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:datalist>

Hope this helps.... Rich
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top