我有一个Telerik RadGrid设置
<div id="RadGird" style="margin-top: 10px;">
<telerik:RadGrid ID="RadGrid1" runat="server"
OnItemCommand="RadGrid1_ItemCommand"
RenderMode="Lightweight"
AutoGenerateColumns="False"
AllowSorting="True"
AllowPaging="true"
AllowCustomPaging ="true"
OnNeedDataSource="RadGrid1_NeedDataSource" GroupPanelPosition="Top" PageSize="50">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling>
</ClientSettings>
<MasterTableView CommandItemDisplay="Top" DataKeyNames="ID"
Font-Size="Small" Name="MasterView" TableLayout="Fixed">
<CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="False" />
<CommandItemTemplate>
<asp:LinkButton ID="LinkButton3" runat="server" CommandName="AddNewInmate" CausesValidation="false" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px" alt="" src="images/AddRecord.png" /> Add new Inmate</asp:LinkButton>
</CommandItemTemplate>
<Columns>
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Edit">
<ItemTemplate>
<asp:LinkButton ID="EditRecord" runat="server" CommandName="EditInmate" CausesValidation="false" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px" alt="" src="images/icon_edit.gif" /></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn Display="false" DataField="ID" UniqueName="ID" DataType="System.String"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="RecDate" DataType="System.DateTime" Display="True" HeaderText="Received Date" UniqueName="ReceivedDate" DataFormatString="{0:M/d/yyyy}" Visible="True"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="InNumber" DataType="System.String" UniqueName="InNumber" Display="true" HeaderText="InNumber"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="FCNumber" DataType="System.String" UniqueName="FCNumber" Display="true" HeaderText="SID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="JackNumber" DataType="System.String" UniqueName="JackNumber" Display="true" HeaderText="Jack Number"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="Comments" DataType="System.String" UniqueName="Comments" Display="true" HeaderText="Comments"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="Employee" DataType="System.String" UniqueName="AddedBy" Display="true" HeaderText="Added By"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="Status" DataType="System.String" UniqueName="Status" Display="true" HeaderText="Status"></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="true" AllowFiltering="false" DataField="Type" DataType="System.String" UniqueName="Type" Display="true" HeaderText="Type"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings ReorderColumnsOnClient="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder">
<Virtualization EnableVirtualization="true" InitiallyCachedItemsCount="2000"
LoadingPanelID="RadAjaxLoadingPanel1" ItemsPerView="50"/>
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="500px" />
<Resizing AllowColumnResize="true" />
</ClientSettings>
<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
</telerik:RadGrid>
</div>
所有内容都加载并显示了数据,但是我看不到任何分页控件,我获得了前50条记录,但没有页面控件。
我错过了什么
答案 0 :(得分:0)
我认为您应该在PageStyle标记中添加“ AlwaysVisible = true ”。对于此问题可能有所帮助。