Declined
Last Updated: 14 Nov 2024 14:54 by ADMIN
Claudio
Created on: 07 Nov 2024 14:41
Category: Kendo UI for Angular
Type: Feature Request
0
[kendo-data-query] Add group per "headers" pagination option

By default the grid pagination only works taking count of the actual records instead of (alternatively) taking in consideration the groups count.

It would be nice to have the possibility to choose between those 2 when using groupBy and process functions.

This pagination feature is already implemented in the Kendo Ui for Asp.Net Core, but it is not available in functions such as processgroupBy or (toDataSourceRequest/toDataSourceRequestString/toOdataString)

Here you can find the related documentation page for the Asp.Net implementation.

Right now the only possible way to achieve this behavior in combo with a KendoAngularGrid is to use the (toDataSourceRequest/toDataSourceRequestString), then into the controller you'll have to mutate the DataSourceRequest Object like following:

[HttpGet]
public async Task<IActionResult> GetData([DataSourceRequest] DataSourceRequest request, CancellationToken cancellationToken) {
    var data = //...  ;

    request. Skip = (request.DataSourceRequest.Page - 1) * request.DataSourceRequest.PageSize;
    request.Take = request.DataSourceRequest.PageSize;
    request.IsExcelExportRequest = true; // without this the items property of the GroupResult type will be null
    request.GroupPaging = true;

    return Ok(await data.ToDataSourceResultAsync(request, cancellationToken);
}

1 comment
ADMIN
Yanmario
Posted on: 14 Nov 2024 14:54

Hi Claudio,

Our developers reviewed this and understand that you want to page groups based on their count, not on the records within them. In this case, this functionality isn’t suited for the groupBy or process helpers but would be better supported by the Grid itself, similar to how group paging works in Kendo UI for jQuery.

What I can suggest from here is to open a new feature request for such built-in functionality in the Angular Grid component.

In the meantime, it can be achieved with some custom logic as described in the following forum post:

https://www.telerik.com/forums/splitting-the-grid-groups-into-pages#4927201

Updated example - https://stackblitz.com/edit/angular-qinaey-jcp9tp?file=src%2Fapp%2Fapp.component.ts

Feel free to open up a new feature request, or do let me know if you want me to log one on your behalf.

Regards,
Yanmario
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.