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

Error removing group column

4 Answers 292 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eduardo
Top achievements
Rank 1
Eduardo asked on 27 Apr 2017, 09:36 PM

Hello,

I have a grid with multiple nested aggregations. When I click on the 'X' icon to remove the aggregation, I get the following JavaScript error:

Uncaught TypeError: r[n].call is not a function
    at init.trigger (kendo.all.js:124)
    at init.change (kendo.all.js:47748)
    at init.trigger (kendo.all.js:124)
    at init._change (kendo.all.js:24315)
    at init._removeIndicator (kendo.all.js:24311)
    at HTMLAnchorElement.<anonymous> (kendo.all.js:24180)
    at HTMLDivElement.dispatch (jquery.min.js:3)
    at HTMLDivElement.r.handle (jquery.min.js:3)

 

The column button is removed from the aggregation top band, but the aggregated data remains in the grid and there is no way to get rid of it.

 

I don't know where to look. Any ideas?

Thank you,

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 May 2017, 08:53 AM
Hello Eduardo,

If I correctly understand the scenario, the Grid is grouped using multiple groups with aggregates for the columns, and when one of the groups is removed from the grouping, the error occurs and the aggregates are still shown?

If this is correct, this is not a known issue and it was not reproduced in our testing scenarios.

I can assume that it may be caused by a custom code which we are overlooking at this moment.

Could you please send a fully runnable example reproducing the issue and I will gladly assist.


Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Eduardo
Top achievements
Rank 1
answered on 07 May 2017, 11:17 AM

Stefan,

 

Thank you for your help.

I've set up an example, which is almost identical to our development: http://dojo.telerik.com/@edo/IjifAk/5

The only difference, is our data source is a json web service. In this case, I copied a sample web service answer to a javascript variable.

However, I cannot make the aggregation work, although is the same code I have thee aggregates correctly! Can you give me a hand with that? In that case, you will see you cannot remove or add grouping columns.

Regards,

Edo.

0
Stefan
Telerik team
answered on 09 May 2017, 12:59 PM
Hello Eduardo,

Thank you for providing a runnable example.

After inspecting the example I noticed that the group and the aggregates properties are set in the Grid options, but they are actually part of the dataSource configuration:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-group

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-aggregate

Once I placed them in the dataSource configuration, the example is working as expected:

http://dojo.telerik.com/ediDa

I just removed the rows with the footer and header templates, as they had missing custom functions.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
Eduardo
Top achievements
Rank 1
answered on 15 May 2017, 01:11 PM

Stefan,

Problem solved.

I had those properties in the grid definition. But the data source was changed in response to a button click. This caused the data appear correctly, but at the same time caused several failures: freezing when removing a group, couldn't add a group, and so on.

After we removed the wrong properties from the grid definition, everything works like a charm.

Thank you for your support.

Edo.

Tags
Grid
Asked by
Eduardo
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Eduardo
Top achievements
Rank 1
Share this question
or