Results 1 to 3 of 3

Thread: Formatting Datagrid

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Formatting Datagrid

    Can anyone tell me where I can find an example of a datgrid formatted to show a single record on more than 1 row.

    For example I would like to show "Employee Name" in the first row with the "Address1" field underneath.

    Any Ideas folks ?

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    not sure about datagrids as i usually tend to use repeaters but with a repeater it can be achieved like this.....
    Code:
    <asp:Repeater ID="rpt1" Runat="server">
      <HeaderTemplate>
        <table>
          <tr>
             <td>Names and address</td>
         </tr>
      </HeaderTemplate>
      <ItemTemplate>
        <tr>
    	  <td><%# databinder.eval(container, "dataitem.name") %></td>
        </tr>
        <tr>
    	  <td><%# databinder.eval(container, "dataitem.address") %></td>
        </tr>
      </ItemTemplate>
      <FooterTemplate>
        </table>
      </FooterTemplate>
    </asp:Repeater>

  3. #3

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    Thanks Fishcake but I want to implement paging which to the best of my knowledge is a damn site easier with a grid.

    On saying that, I'll keep it in mind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width