Group property in the mvvm doesn't work!

5 posts, 0 answers
  1. Federico
    Federico avatar
    28 posts
    Member since:
    Sep 2017

    Posted 18 Oct 2017 Link to this post

    <div data-role="grid" id="id"
    data-groupable="true"   
    data-group="function(e) {
    if (e.groups.length > 1) {
    console.log('ciao');
    e.groups[0] = e.groups.pop();
    }}"
    data-columns="[
        { 'field': 'name', 'width': 270 },
        { 'field': 'age' },
       ]
     </div>

    Error:

     

     

    how do I fix it?

  2. Federico
    Federico avatar
    28 posts
    Member since:
    Sep 2017

    Posted 18 Oct 2017 in reply to Federico Link to this post

    Error: Uncaught TypeError: r[n].call is not a function

  3. Preslav
    Admin
    Preslav avatar
    516 posts

    Posted 19 Oct 2017 Link to this post

    Hello Federico,

    Based on the provided code, I believe the reason for this behavior is the incorrect syntax.

    Having said that, please check the MVVM demo of the Grid:
    In the above demo, see how the events are handled with the usage of the data-bind object attribute.

    I hope this helps.


    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Neeraj
    Neeraj avatar
    127 posts
    Member since:
    May 2015

    Posted 16 Jan 2018 Link to this post

    please provide sample demo for mvvm, if we want to pre-select grouping column set to unchangeable
  5. Preslav
    Admin
    Preslav avatar
    516 posts

    Posted 16 Jan 2018 Link to this post

    Hello Neeraj,

    I am afraid that I do not understand your project requirements. Having said that, could you please elaborate on them?

    I look forward to hearing from you.


    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top