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

Retrieve selected detail row data

1 Answer 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sanjay
Top achievements
Rank 1
Sanjay asked on 20 Jul 2016, 05:33 AM

I have a Parent/Child grid and have 2 custom buttons (Show & Delete)

1. On Show button click, I need to get selected child rows data.

2. On Delete Button Click, I need to delete child rows from grid

Appreciate any help.

Best Regards,

Sanjay

1 Answer, 1 is accepted

Sort by
0
Sanjay
Top achievements
Rank 1
answered on 20 Jul 2016, 06:29 AM

Here detailGrid is child grid. I can get selected rows from 1st detail grid. But in case selected row is from 2nd detail grid, its not showing the data. 

 

       var grid = $("#detailGrid").data("kendoGrid");
        var selectedData = grid.select();
        var items = [];
        $.each(selectedData, function (idx, elem) {
                   items.push(grid.dataItem(elem));
                  console.log("selectedData.."+JSON.stringify(grid.dataItem(elem)));
        });

Tags
Grid
Asked by
Sanjay
Top achievements
Rank 1
Answers by
Sanjay
Top achievements
Rank 1
Share this question
or