Kurkula
Kurkula

Reputation: 6762

Removing default grouping in Kendo Grid

I am trying to implement react kendo grid from this example from Kendo. I see that one column is grouped by default. I am trying to implement grouping but without one default column grouped already. How can I load data without default grouped column?

I tried

 state = this.createAppState({
        take: 10,
        group: [ { field: '' } ]
    });

Also Tried

 state = this.createAppState({
        take: 10,
        group: []
    });

Upvotes: 1

Views: 543

Answers (2)

Marco
Marco

Reputation: 23937

Your second snippet is almost correct, but you are missing the skip property:

state = this.createAppState({
    skip: 0,
    take: 10,
    group: []
});

Without it you would get the message "No records available". Alternatively also remove the take property and it will work too:

state = this.createAppState({
    group: []
});

Upvotes: 1

Plamen Zdravkov
Plamen Zdravkov

Reputation: 748

When you set the group to an empty array it will initialize a grouping without a default grouped column - here is an example that worked correctly at my side - https://stackblitz.com/edit/react-ynzwm7-thwt8x?file=app/main.js .

Upvotes: 1

Related Questions