Error removing group column

5 posts, 0 answers
  1. Eduardo
    Eduardo avatar
    21 posts
    Member since:
    Aug 2016

    Posted 27 Apr 2017 Link to this post

    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,

  2. Stefan
    Admin
    Stefan avatar
    2834 posts

    Posted 01 May 2017 Link to this post

    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.
  3. Eduardo
    Eduardo avatar
    21 posts
    Member since:
    Aug 2016

    Posted 07 May 2017 Link to this post

    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.

  4. Stefan
    Admin
    Stefan avatar
    2834 posts

    Posted 09 May 2017 Link to this post

    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 visualization (charts) and form elements.
  5. Eduardo
    Eduardo avatar
    21 posts
    Member since:
    Aug 2016

    Posted 15 May 2017 in reply to Stefan Link to this post

    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.

Back to Top