Fixed size of GridView to allow continuous paging?

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Hello

I have a GridView that resides in a table on an ASP.NET web page using
javascript and C# as codebehind. The GridView allows paging so when it
loads data its by page if all rows dont fit on the page, the page numbers
are at the bottom of the GridView. However if I click any of the page
numbers the "height" of the GridView expands (but the number of rows stays
the same) I even set RowStyle to 10px and GridView to 50px the expanded
height of the controls
clobbers other controls on the web page and none of the page numbers
respond if clicked anymore. How can I prevent the size/height of the
GridView from expanding once I click on on the next page or any other page
number? Below is the GridView declaration:

<table id="Pollsitecont">
<tr>
<td>

<asp:GridView ID="PollsiteGrid" AllowPaging="True"

OnPageIndexChanging="PollsiteGrid_PageIndexChanged"
PageSize="5" Height="50px" Width="1000px"

DataSourceID="ObjectDataSource1" AutoGenerateColumns="false" runat="server"
<RowStyle Height="10px" />

<Columns>
<asp:BoundField DataField="ProblemID" HeaderText="Prob ID#"

SortExpression="ProblemID" />
<asp:BoundField DataField="CallTypeID" HeaderText="Call Type"

SortExpression="CallTypeID" />
<asp:BoundField DataField="ED" HeaderText="ED"

ItemStyle-Width="50px" SortExpression="ED" />
<asp:BoundField DataField="AD" HeaderText="AD" />
<asp:BoundField DataField="ProblemID" HeaderText="Problem"

SortExpression="ProblemID" />
<asp:BoundField DataField="IncidentComments"

HeaderText="Comments" SortExpression="IncidentComments" />
<asp:BoundField DataField="CallDateTime" HeaderText="Call Date

Time" SortExpression="CallDateTime" />
<asp:BoundField DataField="DispatchDateTime"

HeaderText="Dispatch Date Time" SortExpression="DispatchDateTime" />
<asp:BoundField DataField="ResolvedDateTime"

HeaderText="Resolved Date Time" SortExpression="ResolvedDateTime" />
</Columns>

</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="loadGrid" TypeName="EDCC.DAccess">
<SelectParameters>
<asp:Parameter Name="gridDs" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
</td>
</tr>
</table>
 
Back
Top