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
    http://www.developmentnow.com
    Chris, Apr 28, 2005
    #1
    1. Advertising

  2. 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


    "Chris" wrote:

    > 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
    >
    =?Utf-8?B?UmljaA==?=, Apr 29, 2005
    #2
    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. Replies:
    4
    Views:
    4,118
    =?Utf-8?B?Y2xpY2tvbg==?=
    Apr 28, 2006
  2. varadha
    Replies:
    3
    Views:
    435
    Kevin Goodsell
    Sep 9, 2003
  3. Senthil

    Mutiple JVM in Single Os

    Senthil, Feb 9, 2007, in forum: Java
    Replies:
    4
    Views:
    662
    Chris Uppal
    Feb 11, 2007
  4. Jason Barnett

    Writing single client script block for mutiple controls

    Jason Barnett, Jun 9, 2006, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    158
  5. Lakshmi Narayanan.R

    Mutiple server forms in single asp.net page

    Lakshmi Narayanan.R, Jul 22, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    118
    Lakshmi Narayanan.R
    Jul 23, 2004
Loading...

Share This Page