DataGrid, 7 columns on 2 rows?

Discussion in 'ASP .Net Datagrid Control' started by Chris Podmore, Apr 2, 2004.

  1. Is this possible? I currently have a datagrid showing 7 columns, I would like to show the 6th and 7th columns on the next row. How can I do this?
     
    Chris Podmore, Apr 2, 2004
    #1
    1. Advertising

  2. Hi Chris,

    Based on my understanding, you want to do databinding to your datagrid
    control, and wrap some columns to another row.

    Actually, datagrid control did not expose such flexibility, but you still
    can get what you want through Repeater control, do like this:

    <asp:repeater id="Repeater1" runat="server">
    <HeaderTemplate>
    <table border="1" cellpadding="0" cellspacing="0">
    </HeaderTemplate>
    <ItemTemplate>
    <tr>
    <td><%#DataBinder.Eval(Container.DataItem, "job_id")%></td>
    <td><%#DataBinder.Eval(Container.DataItem, "min_lvl")%></td>
    <td><%#DataBinder.Eval(Container.DataItem, "max_lvl")%></td>
    </tr>
    <tr>
    <td><%#DataBinder.Eval(Container.DataItem, "job_description")%></td>
    </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </asp:repeater>

    Please apply my suggestion to see if it works for you.

    Thanks,

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jeffrey Tan[MSFT], Apr 3, 2004
    #2
    1. Advertising

  3. Jeffrey,

    Thanks for the reply. I will give it a try as soon as I can. I have had to move on to another part of the project for now but when I get a chance I will give your suggestion a try.

    Chris.

    ----- Jeffrey Tan[MSFT] wrote: -----

    Hi Chris,

    Based on my understanding, you want to do databinding to your datagrid
    control, and wrap some columns to another row.

    Actually, datagrid control did not expose such flexibility, but you still
    can get what you want through Repeater control, do like this:

    <asp:repeater id="Repeater1" runat="server"><HeaderTemplate><table border="1" cellpadding="0" cellspacing="0"></HeaderTemplate><ItemTemplate><tr><td><%#DataBinder.Eval(Container.DataItem, "job_id")%></td><td><%#DataBinder.Eval(Container.DataItem, "min_lvl")%></td><td><%#DataBinder.Eval(Container.DataItem, "max_lvl")%></td></tr><tr><td><%#DataBinder.Eval(Container.DataItem, "job_description")%></td></tr></ItemTemplate><FooterTemplate></table></FooterTemplate></asp:repeater>

    Please apply my suggestion to see if it works for you.

    Thanks,

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Chris Podmore, Apr 5, 2004
    #3
  4. Hi Chris,

    Thanks for your feedback.

    Ok, once you have finished trying, please feel free to feedback. Thanks

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jeffrey Tan[MSFT], Apr 5, 2004
    #4
  5. Jeffery

    I haven't actually tried your suggestion, sorry. Since my original post I have purchased Infragistics NetAdvantage controls, not originally for their grid for some of their other controls. It's quite easy to implement what I was after using their webGrid control so I have gone for that.

    Thanks again
    Chris

    ----- "Jeffrey Tan[MSFT]" wrote: ----

    Hi Chris

    Thanks for your feedback.

    Ok, once you have finished trying, please feel free to feedback. Thank

    Best regards
    Jeffrey Ta
    Microsoft Online Partner Suppor
    Get Secure! - www.microsoft.com/securit
    This posting is provided "as is" with no warranties and confers no rights
     
    Chris Podmore, Apr 8, 2004
    #5
  6. Hi Chris,

    I am glad you got what you want. If you need further help, please feel free
    to feedback, I will help you. Thanks

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jeffrey Tan[MSFT], Apr 9, 2004
    #6
    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. Bob
    Replies:
    3
    Views:
    7,749
    William Gower
    Aug 1, 2004
  2. helpful sql
    Replies:
    0
    Views:
    853
    helpful sql
    May 19, 2005
  3. Jimmy
    Replies:
    1
    Views:
    3,188
    Eliyahu Goldin
    Jun 14, 2005
  4. Ahmed Jewahar
    Replies:
    4
    Views:
    1,170
    Ahmed Jewahar
    Jun 10, 2007
  5. Jack Mullins

    Inverting DataGrid columns and rows in excel

    Jack Mullins, Nov 26, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    212
    Jack Mullins
    Dec 2, 2003
Loading...

Share This Page