【问题标题】:Telerik GridGroupByExpression show only one entryTelerik GridGroupByExpression 只显示一个条目
【发布时间】:2015-02-24 08:10:32
【问题描述】:

使用 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>

【问题讨论】:

    标签: c# telerik dotnetnuke telerik-grid


    【解决方案1】:

    问题来自 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">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-18
      • 1970-01-01
      • 2021-02-22
      • 1970-01-01
      • 2013-05-13
      • 1970-01-01
      • 2021-11-20
      • 2017-05-18
      相关资源
      最近更新 更多