Telerik GridGroupByExpression仅显示一个条目

时间:2015-02-24 08:10:32

标签: c# telerik dotnetnuke telerik-grid

与Telerik RadGrid合作,我选择了我的结果。

在添加我的论坛之前,所有数据都正确显示。 之后,它只显示第一个条目,并在下一页告诉我有X个结果(没有可能去这些页面)

我想知道什么是错的,或者我错过了什么。

要对结果进行分组,我使用此代码。

<GroupByExpressions>
<rad:GridGroupByExpression> 
    <SelectFields> 
        <rad:GridGroupByField FieldName="EndUserCompany" /> 
    </SelectFields> 
    <GroupByFields> 
        <rad:GridGroupByField FieldName="EndUserCompany" /> 
    </GroupByFields> 
</rad:GridGroupByExpression>

如果我将其删除,所有结果都会正确显示,但当然不会被分组

这是我的视图代码。

<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
AllowPaging="true" AllowCustomPaging="true" PageSize="50"  AllowSorting="true" AllowFilteringByColumn="True"
EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">
<GroupingSettings CaseSensitive="false" />
<MasterTableView DataKeyNames="EndUserCompany" GroupLoadMode="Client" Width="100%">
    <GroupByExpressions>
        <rad:GridGroupByExpression> 
            <SelectFields> 
                <rad:GridGroupByField FieldName="EndUserCompany" /> 
            </SelectFields> 
            <GroupByFields> 
                <rad:GridGroupByField FieldName="EndUserCompany" /> 
            </GroupByFields> 
        </rad:GridGroupByExpression>
    </GroupByExpressions>
    <Columns>
        <rad:GridBoundColumn HeaderText="NumLicense" DataField="NumLicense" 
            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
        <rad:GridBoundColumn HeaderText="StatusLicense" DataField="StatusLicense" 
            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
        <rad:GridBoundColumn HeaderText="NameProduct" DataField="NameProduct" 
            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
        <rad:GridTemplateColumn HeaderText="ActiveMaintenance" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-HorizontalAlign="Center" AllowFiltering="False">
            <ItemTemplate>
                <dnn:DnnImage Runat="server" ID="activeMaintenance" IconKey="Checked" Visible="False" />
                <dnn:DnnImage Runat="server" ID="noActiveMaintenance" IconKey="Unchecked" Visible="False" />
            </ItemTemplate>
        </rad:GridTemplateColumn>
    </Columns>
</MasterTableView>
<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
    <Selecting AllowRowSelect="True" />
    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
</ClientSettings>

1 个答案:

答案 0 :(得分:0)

问题来自AllowCustomPaging

禁用它修复我的问题

<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
                        AllowPaging="true" AllowCustomPaging="false" PageSize="50"  AllowSorting="false" AllowFilteringByColumn="true"
                        EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">