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

Aggregates and filters being sent to server when they shouldn't

3 Answers 55 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Brian Vallelunga
Top achievements
Rank 1
Brian Vallelunga asked on 18 May 2012, 08:46 PM
I have a grid using a data source with serverAggregates and serverFiltering set to false. The first time the remote data endpoint is queried, everything is fine. However, after the data comes back, I manually set some aggregates. Then, on a subsequent call to dataSource.read(), all of the aggregates are sent to the server in the query string. I'm not sure what to do, but this seems like a bug and is causing me problems in that I actually reach the query string length limit.

A sample url looks like this, decoded:

http://localhost:57135/ReportData?filter[logic]=and&filter[filters][0][field]=IsContractor&filter[filters][0][operator]=eq&filter[filters][0][value]=false&aggregate[0][field]=May_01&aggregate[0][aggregate]=sum&aggregate[1][field]=May_02&aggregate[1][aggregate]=sum&aggregate[2][field]=May_03&aggregate[2][aggregate]=sum&aggregate[3][field]=May_04&aggregate[3][aggregate]=sum&aggregate[4][field]=May_05&aggregate[4][aggregate]=sum&aggregate[5][field]=May_06&aggregate[5][aggregate]=sum&aggregate[6][field]=May_07&aggregate[6][aggregate]=sum&aggregate[7][field]=May_08&aggregate[7][aggregate]=sum&aggregate[8][field]=May_09&aggregate[8][aggregate]=sum&aggregate[9][field]=May_10&aggregate[9][aggregate]=sum&aggregate[10][field]=May_11&aggregate[10][aggregate]=sum&aggregate[11][field]=May_12&aggregate[11][aggregate]=sum&aggregate[12][field]=May_13&aggregate[12][aggregate]=sum&aggregate[13][field]=May_14&aggregate[13][aggregate]=sum&aggregate[14][field]=May_15&aggregate[14][aggregate]=sum&aggregate[15][field]=May_16&aggregate[15][aggregate]=sum&aggregate[16][field]=May_17&aggregate[16][aggregate]=sum&aggregate[17][field]=May_18&aggregate[17][aggregate]=sum&aggregate[18][field]=Total&aggregate[18][aggregate]=sum&aggregate[19][field]=Difference&aggregate[19][aggregate]=sum

The columns listed are in my data source's aggregates, but they shouldn't be sent to the server.

3 Answers, 1 is accepted

Sort by
0
Brian Vallelunga
Top achievements
Rank 1
answered on 21 May 2012, 07:56 PM
Any thoughts on this problem? I've had to disable aggregates in one of my reports due to this bug. I've tried zeroing out the aggregates just before calling dataSource.read(), but that does not help.
0
Accepted
Alexander Valchev
Telerik team
answered on 23 May 2012, 02:51 PM
Hi Brian,

Actually this behaviour is expected by design, but we will appreciate if you submit your query as a feature requests at our user voice page. Thus way the community would be able to comment and evaluate the idea and if it turns out to be popular we will consider its implementation for future releases.

Meanwhile you could use the parameterMap function to trim the information (aggregates and filters) that is being send to the server.
parameterMap: function(options, operation) {
    //....
}

I hope this helps.

All the best,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brian Vallelunga
Top achievements
Rank 1
answered on 23 May 2012, 07:40 PM
Why is this the designed behavior? It seems that if I specify the server does no filtering or aggregating, then the query parameters should not be passed to it. I will start a feature request to have it changed.
Tags
Data Source
Asked by
Brian Vallelunga
Top achievements
Rank 1
Answers by
Brian Vallelunga
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or