Search code examples
c#telerikdotnetnuketelerik-grid

Telerik GridGroupByExpression show only one entry


Working with Telerik RadGrid, I choose to grouyp my result.

Before add my group, all datas was displaying correctly. After, it only show me the first entry, and tell me there are X results, on next pages (without possibilities to go to these pages)

I would like to know what is wrong, or what did I miss.

To group my result, I use this code.

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

If I remove it, all result are properly displayed, but of course, without be grouped

Here my code for the view.

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


Solution

  • The issue came from AllowCustomPaging

    Disable it fix my issue

    <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">