This is a migrated thread and some comments may be shown as answers.
The select group combination is not working
5 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
Jhony
Top achievements
Rank 1
Jhony asked on 27 Jul 2017, 02:49 PM
The combination "groupable" and "selection" is not working. When I wrote the code like example(http://plnkr.co/edit/DlQCEsjJW55b5jffnG1b?p=preview) combination the function bring the incorrect index values.
onSelectionChange(event) { alert(event.index); }
Any idea ?

5 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 31 Jul 2017, 09:56 AM
Hello Jhony,

The described issue is caused by the fact that the current Grid selection functionality exposes the absolute row index of the selected row only, and it is not directly correlated to the actual data item.

We recently released a serious reimplementation of the selection functionality, and many new features like multiple row selection, programmatic selection, selection via checkbox column, as well as an API for obtaining the currently selected data items, is now available out-of-the-box.

The development build should is now available, and you can get more details about the enhancements, and how to install and use this release in the following GitHub issue:

https://github.com/telerik/kendo-angular/issues/634#issuecomment-318688111

Meanwhile, you can obtain the correct item by processing the data in accordance with the current Grid State (sorting, paging etc. config), for example:

http://plnkr.co/edit/8MGuWuqxBBS7TFrcByv4?p=preview

For grouped data, as it has different structure, the data should be flattened first, and then the item should be obtained by the respective index, e.g.:

http://plnkr.co/edit/tOvnQp8i2I8pWbjAixmh?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
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.
0
Jhony
Top achievements
Rank 1
answered on 02 Aug 2017, 06:09 PM

The example didn't work, it's bringing random informations when has a grouping configurated.

0
Dimiter Topalov
Telerik team
answered on 04 Aug 2017, 11:46 AM
Hello Jhony,

Please accept my apologies, I must have linked the wrong Plunker for the grouping example. Here is a working one:

http://plnkr.co/edit/GfyXQdOcTiDhWwmkotCH?p=preview

You can integrate it with the one, demonstrating the other data operations as follows:

http://plnkr.co/edit/OmmAhaR0VqxphWoZJIfG?p=preview

Regards,
Dimiter Topalov
Progress Telerik
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.
0
Jhony
Top achievements
Rank 1
answered on 19 Sep 2017, 05:26 PM

Hello,

I tried access the plunker but i didn't have success..

But i'm tried to do the sample that you sended me on plunker, with one groupable it's works, but with two or more group doesn't get the correct dataItem.. he get me a array of groupable and the dataItem on items property.

0
Dimiter Topalov
Telerik team
answered on 21 Sep 2017, 06:47 AM
Hi Jhony,

The Plunkers might be outdated in terms of required SystemJS config. You can run older plunker examples by opening a current one from the official documentation, and replacing the systemjs.config.js file content in the non-working plunker with the one from the working example.

The previously discussed enhanced Grid selection functionality is now released, and you can check out the new specifics here:

http://www.telerik.com/kendo-angular-ui/components/grid/selection/

Here is an example that demonstrates a selectable groupable Grid. The selected and deselected items are logged to the console on each selectionChange event:

http://plnkr.co/edit/9RofM0FR7sAuziyfIaHR?p=preview

Regards,
Dimiter Topalov
Progress Telerik
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.
Tags
Grid
Asked by
Jhony
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Jhony
Top achievements
Rank 1
Share this question
or