我想在gridview上关闭分页,但是,我似乎无法将其关闭,我不明白它是否会开始。
这似乎是一个基本问题,但我似乎无法找到任何人有同样的问题。我可以发现很多人在打开分页时遇到问题,但是没有人将其关闭。
ASP.Net代码
<asp:TabContainer ID="tcQuestions" runat="server" Width="100%" ActiveTabIndex="2">
<asp:TabPanel ID="tpAll" runat="server" HeaderText="All Questions" ScrollBars="None">
<ContentTemplate>
<asp:UpdatePanel ID="upAll" runat="server">
<ContentTemplate>
<asp:GridView ID="gvAllQuestions" runat="server" DataSourceID="sdsQuestions" AutoGenerateColumns="False" AllowPaging="False" Width="100%">
<Columns>
<asp:HyperLinkField DataTextField="QuestionRef" HeaderText="Ref" DataNavigateUrlFields="FkSection,QuestionID" DataNavigateUrlFormatString="questions/{0}/{1}">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:HyperLinkField>
<asp:BoundField DataField="QuestionText" HeaderText="Question" />
<asp:BoundField DataField="Period" HeaderText="Frequency">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="ValidFrom" HeaderText="Start From" DataFormatString="{0:dd MMM yy}">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="ObsoleteDate" HeaderText="Next Review" DataFormatString="{0:dd MMM yy}">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="sdsQuestions" runat="server"
ConnectionString="<%$ ConnectionStrings:ApplicationConnectionString %>"
SelectCommand="SELECT QuestionID, QuestionRef, QuestionText, FkSection, Period, ValidFrom, ObsoleteDate FROM Questions WHERE [FkSection] = @SectionID ORDER BY Obsolete, ObsoleteDate Desc">
<SelectParameters>
<asp:ControlParameter ControlID="ddlSections" Name="SectionID" />
</SelectParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
没有影响gridview的代码。