Add a row in a a group in grid

1 Answer 151 Views
Grid
Blavier
Top achievements
Rank 1
Blavier asked on 07 May 2021, 01:43 PM
hi i m a new user of kendo, and  i would know if it s possible to add a row inside a grouped grid?i want the row visible in edition inside the group.

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 12 May 2021, 07:54 AM | edited on 12 May 2021, 07:54 AM

Hello Blavier,

The developer can apply grouping to any of our available examples of editable Grid, listed on this page:

https://www.telerik.com/kendo-angular-ui-develop/components/grid/editing/

For example here is a groupable Grid that uses inline editing on row click:

https://stackblitz.com/edit/angular-tuaf1j

When a new record is added, while the Grid is grouped, an edit row appears at the top and this is by default. When saving the new row, the developer needs to process the Grid data in order to show the newly added row in its respective group.

In the above example, this is done by calling loadProducts function in saveCurrent() handler. The loadProducts uses process method to apply the new state and rebinding the Grid with the updated collection:

loadProducts() {
    this.view = process(this.service.products(), this.state).data;
  }

I hope the provided information helps. Let me know if there is anything else I can help with.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Blavier
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or