display mutiple rows data fields for single record

Discussion in 'ASP .Net' started by Chris, Apr 28, 2005.

  1. Chris

    Chris Guest

    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
    Chris, Apr 28, 2005
    1. Advertisements

  2. Chris

    Guest Guest

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

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

    Hope this helps.... Rich
    Guest, Apr 29, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.