DataGrid, 7 columns on 2 rows?

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default DataGrid, 7 columns on 2 rows?

    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 Guest

  2. Similar Questions and Discussions

    1. Howto display an ASP.net datagrid rows as columns and vice versa?
      Hi I want to display my datagrid with the columns horizontal and rows vertical, so just the other way around. For example instead of : name ...
    2. Add/Delete rows/columns in datagrid
      Hi, I'm trying to add additional or delete rows/columns to a datagrid based on a specified number. I tried addColumn, this only adds 1 column at...
    3. datagrid sort columns not rows
      Hi, I am filling a datagrid via xml and the columns as not created in the order I have in my xml. I've also added them in the correct order in...
    4. DataGrid: Selecting multiple rows/columns
      Hi, I would like to enhance the DataGrid by adding scripting functionality that allows the selection of multiple rows or columns via...
    5. Inverting DataGrid columns and rows in excel
      I am populating a datagrid and allowing it to be exported as an excel spreadsheet but my internal customer needs the columns and rows inverted. Any...
  3. #2

    Default Re: DataGrid, 7 columns on 2 rows?

    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "as is" with no warranties and confers no rights.


    Jeffrey Tan[MSFT] Guest

  4. #3

    Default Re: DataGrid, 7 columns on 2 rows?

    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "as is" with no warranties and confers no rights.



    Chris Podmore Guest

  5. #4

    Default Re: DataGrid, 7 columns on 2 rows?

    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "as is" with no warranties and confers no rights.

    Jeffrey Tan[MSFT] Guest

  6. #5

    Default Re: DataGrid, 7 columns on 2 rows?

    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! - [url]www.microsoft.com/securit[/url]
    This posting is provided "as is" with no warranties and confers no rights


    Chris Podmore Guest

  7. #6

    Default Re: DataGrid, 7 columns on 2 rows?

    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "as is" with no warranties and confers no rights.

    Jeffrey Tan[MSFT] Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139