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

Remove k-detail-row with grid.removeRow(rw) does not work

2 Answers 453 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Trenton
Top achievements
Rank 1
Trenton asked on 19 Sep 2014, 06:56 PM
Based on the documentation for the removeRow method of the grid, I should be able to remove a row by passing "tr" reference to the method.  Am I not getting the reference the correct way?

I'm capturing a click event on specific cells in the row to handle expand/collapse.  The click event finds the row reference:

var rw = $(this).closest("tr");

I find the detail row:

rw2Del = $(rw).next(".k-detail-row");

I get a reference to the grid:

var grid = $("#boxesgrid").data("kendoGrid");

I then collapse the row to hide it, then I call removeRow - but nothing actually happens:

grid.removeRow(rw2Del);

I'm attaching my test project.

2 Answers, 1 is accepted

Sort by
0
Trenton
Top achievements
Rank 1
answered on 23 Sep 2014, 01:31 PM
The resolution for this is to use the jquery "remove" method, rather than the kendo "removerow" method.  The code changes from

grid.removeRow(rw2Del);

to

rw2Del.remove();
0
Accepted
Dimiter Madjarov
Telerik team
answered on 25 Sep 2014, 07:20 AM
Hello Trenton,


I am glad to hear the issue is resolved. If further assistance is required, do not hesitate to contact us.

Regards,
Dimiter Madjarov
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
Trenton
Top achievements
Rank 1
Answers by
Trenton
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or