This is a migrated thread and some comments may be shown as answers.

Serialize grid state

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
amine
Top achievements
Rank 1
amine asked on 16 Sep 2020, 10:18 AM

Hello,

When i try to serialize a grid state object with aggregate operation using the `toDataSourceRequest ` or `toDataSourceRequestString` API's they simply get ignore/not mentioned in the output. ( i'm trying to achieve server side aggregation )

state object example : 

{
    skip : 0,
    take : 10,
    group : [
             {
                     aggregates: [ { field: 'myField', aggregate: 'count' } ],
                    field: 'myField'
              }

          ]
}

toDataSourceRequest output : {page: 1, pageSize: 10, group: "myField-asc"}

toDataSourceRequestString output : page=1&pageSize=10&group=myField-asc

 

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 18 Sep 2020, 09:17 AM

Hi Amine,

Indeed, that is a known issue logged in our public GitHub repository. Please check it at the following link:

https://github.com/telerik/kendo-angular/issues/2957

Please add the aggregates to the root level of the state converted by the toDataSourceRequest() as demonstrated in issue.

I hope this helps.

Regards,
Svetlin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Grid
Asked by
amine
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or