I am using a GridView with a page size of 10. If I have 10 rows bound to the grid, the layout of the page is correctly proportioned and spaced. (I am using Master Page and ContentPlaceHolder). If I have for example only 5 rows, then everything is displayed in the middle of the page and not starting from the top (I guess something to do with relative positioning). How can I get the page to work and always start positioning at the top. Is there a property setting in the GridView that will allow to fill grid with blank lines if less than page size?
Code:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PropSale.aspx.vb" Inherits="PropSale" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Label ID="Label1" runat="server" BackColor="Red" BorderStyle="None" Font-Size="X-Large"
Style="left: 284px; vertical-align: middle; border-top-style: none; border-right-style: none;
border-left-style: none; position: relative; top: 11px; text-align: center; border-bottom-style: none"
Text="Propellers for Sale" Width="290px"></asp:Label>
<asp:Label ID="Label2" runat="server" BorderStyle="None" Font-Size="Medium" Style="left: -260px;
position: relative; top: 58px" Text="Select size" Width="72px"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Style="left: -260px; position: relative;
top: 62px" Width="99px" BackColor="#FFFFC0"></asp:TextBox>
<asp:Button ID="Button1" runat="server" BackColor="Silver" Style="left: -255px; position: relative;
top: 64px" Text="Search" Width="85px" />
<asp:LinkButton ID="LinkButton1" runat="server" BackColor="White" BorderStyle="None"
Height="18px" PostBackUrl="~/Contact.aspx" Style="left: -183px; position: relative;
top: 60px" Width="209px">Contact us for price (click here)</asp:LinkButton>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
BorderStyle="Solid" CellPadding="8" Font-Size="Small" Height="114px" HorizontalAlign="Left"
Style="left: 25px; position: relative; top: 82px" Width="749px">
<RowStyle Wrap="False" />
<HeaderStyle BackColor="#C0FFFF" BorderStyle="Solid" Font-Size="Small" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="#FFFFC0" Font-Size="Small" HorizontalAlign="Left" />
</asp:GridView>
</asp:Content>