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

Get selected cells in a gri with multiple cell selectable

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Djiby
Top achievements
Rank 1
Djiby asked on 23 May 2015, 10:30 PM

Hello,

I'm using kendo grid with angular. I've declared the grid in the html like that:

<div kendo-grid="grid"
         k-options="gridOptions"
         k-rebind="gridOptions.dataSource.data"
         k-on-change="gridSelectionChange(data, dataItem, columns)"></div>

the grid is multiple cell selectable and what i want is to get the data of the selected cells. The problem is that in my function gridSelectionChange() the parameter data is an array of datas of the row and not the data of the selected cells. How can I get in an array the datas of only selected cells ?

For more information my grid is a Multi-column headers. I bind it with a big json object with arrays for some attributes.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 26 May 2015, 03:22 PM

Hello Djiby,

In this case the columns parameter contains the selected cell index. Using the columns array it is possible to determine which model property value is shown in the selected cell. 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Djiby
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or