changing from panel to gridview - error with layout

tanyacaribou

New Member
Hey guys so where before I was hard coding the panel I wanted to display on screen with:\[code\]<asp:Panel ID="Panel1" runat="server" CssClass="PrintHeader" HorizontalAlign="Center"> <div style="margin-left:10px;margin-bottom:10px;text-align:center;"> <span style="font-size:22px;border-bottom:double 1px black">Construction Contracts</span><br /><br /> <span style="font-size:12px;">317 Upper Road, Mountblock, Liverpool, Co. Such&Such BT70 6HJ</span><br /><br /> <span style="font-size:16px;">Invoice Number: <%: this.CurrentInvoiceName %></span><br /> <span style="font-size:16px;">MEASUREMENT FOR PAYMENT</span><br /> <span style="font-size:12px;">V.A.T. No. 851 119 123</span> </div> </asp:Panel>\[/code\]which produced:
bz0QT.jpg
I then used a GridView with boundField, to pull across the details from the table and display them on sreen..Trouble is i'm having a little difficulty with the layout.I'm using:\[code\]<asp:GridView ID="GridView1" CssClass="PrintHeader" HorizontalAlign="Center" runat="server" Width="100px" AllowSorting="true" AutoGenerateColumns="false" DataSourceID="GridDataSource"> <Columns> <asp:BoundField DataField="id" HeaderText="InvoiceInfoID" ReadOnly="True" SortExpression="InvoiceInfoID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" /> <asp:BoundField DataField="County" HeaderText="County" SortExpression="County" /> <asp:BoundField DataField="Postcode" HeaderText="Postcode" SortExpression="Postcode" /> <asp:BoundField DataField="Invoice Number" HeaderText="Invoice Number" SortExpression="Invoice Number"/> <asp:BoundField DataField="Info" HeaderText="Info" SortExpression="Info" /> <asp:BoundField DataField="VAT Number" HeaderText="VAT Number" SortExpression="VAT Number"/> </Columns> <PagerStyle CssClass="footer"/> <PagerTemplate> <asp:GridViewPager runat="server" /> </PagerTemplate> <EmptyDataTemplate> There are currently no details to display. </EmptyDataTemplate> </asp:GridView> <asp:SqlDataSource ID="GridDataSource" runat="server" ConnectionString="<%$ConnectionStrings:ClarkesTest4FromMaster1ConnectionString %>" SelectCommand="SELECT id, [Name], [Address], [County], [Postcode], [Invoice Number], [Info], [VAT Number] FROM [Invoice Info] ORDER BY [Name]" > </asp:SqlDataSource> \[/code\]and this looks like:
SzqcP.jpg
I would like to change the table to display as my previous layout, without the table, and each row on top of each other, not beside it, i've tried show column=false and stuff like that, also tried using a panel which cant be done,Can anyone please advise what attribute i need to edit in order to achieve what I want?Thank you
 
Back
Top