0

I have a DataGrid with 12 columns and I am trying to put the first 6 columns in one row and the rest of the columns in another row straight under that so that it looks like this:

enter image description here

I was using two separate DataGrids but if there is more than one row it looks like this:

enter image description here

If I just use one DataGrid is there a way to add a break or new line to move some of the columns?

Code:

<asp:DataGrid CssClass="tblResults" runat="server" ID="dgNightline" AutoGenerateColumns="false" >
                                <HeaderStyle CssClass="tblResultsHeader" />
                                <AlternatingItemStyle BackColor="#EEEEEE" />
                                <Columns>
                                    <asp:BoundColumn DataField="FirstDocketNo" HeaderText="Cons No"></asp:BoundColumn>
                                    <asp:BoundColumn DataField="JobNo" HeaderText="Job No"></asp:BoundColumn>
                                    <asp:BoundColumn DataField="CustRef" HeaderText="Cust Ref"/>
                                    <asp:BoundColumn DataField="DeliverDate" HeaderText="Date"/>
                                    <asp:BoundColumn DataField="CollectionAddressName" HeaderText="Collect From"></asp:BoundColumn>
                                    <asp:BoundColumn DataField="DdeliverToShortAddress" HeaderText="Deliver To"></asp:BoundColumn>
                                </Columns>
                            </asp:DataGrid>
                            <asp:DataGrid CssClass="tblResults" runat="server" ID="dgNightline2" AutoGenerateColumns="false">
                                <HeaderStyle CssClass="tblResultsHeader" />
                                <AlternatingItemStyle BackColor="#EEEEEE" />
                                <Columns>
                                    <asp:BoundColumn DataField="Description" HeaderText="Description"></asp:BoundColumn>
                                    <asp:BoundColumn DataField="PieceBreakDown" HeaderText="Qty"></asp:BoundColumn>
                                    <asp:BoundColumn DataField="GrossWeight" HeaderText="Gross Wgt"/>
                                    <asp:BoundColumn DataField="ChgWeight" HeaderText="Chg Wgt"/>
                                    <asp:BoundColumn DataField="DelAmt" HeaderText="Amt"/>
                                </Columns>
                            </asp:DataGrid>
user123456789
  • 1,914
  • 7
  • 44
  • 100

0 Answers0