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

Group property in the mvvm doesn't work!

4 Answers 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 18 Oct 2017, 07:47 AM
<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?

4 Answers, 1 is accepted

Sort by
0
Federico
Top achievements
Rank 1
answered on 18 Oct 2017, 08:02 AM

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

0
Preslav
Telerik team
answered on 19 Oct 2017, 08:55 AM
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.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 16 Jan 2018, 12:04 PM
please provide sample demo for , if we want to pre-select grouping column set to unchangeable
0
Preslav
Telerik team
answered on 16 Jan 2018, 02:33 PM
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.
Tags
Grid
Asked by
Federico
Top achievements
Rank 1
Answers by
Federico
Top achievements
Rank 1
Preslav
Telerik team
Neeraj
Top achievements
Rank 1
Veteran
Share this question
or