Fixed size of GridView to allow continuous paging?

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top