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

delete grid row by UID programmatically

4 Answers 2501 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 11 Jan 2013, 03:52 PM
is it possible to delete a grid row by uid programmatically?
without using the command.. so i've got a custom button.

thanks

4 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 11 Jan 2013, 04:09 PM
Hello David,

Once you have the UID you can get the corresponding model view DataSource API, and then remove it.

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 11 Jan 2013, 04:15 PM

            var dataRow = $('#grid').data("kendoGrid").dataSource.getByUid(uid);
            $('#grid').data("kendoGrid").dataSource.remove(dataRow);
0
Darren
Top achievements
Rank 1
answered on 17 Dec 2015, 02:15 PM

I do :

 var activeRow = $(obv.gridInstance.element).find("tr.k-grid-edit-row");

obv.gridInstance.removeRow(activeRow);

And even though this works on the UI and the row does get removed,
I also get this javascript error: Cannot read property 'call' of undefined on the kendo.all.min.js

So there is an internal kendo bug there that you guys need to fix.

 

0
Nikolay Rusev
Telerik team
answered on 21 Dec 2015, 07:54 AM

Hello Darren,

 

We are not aware of such issue. Please submit a new support ticket with a isolated runnable example of the error.

 

Regards,
Nikolay Rusev
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
David
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
David
Top achievements
Rank 1
Darren
Top achievements
Rank 1
Share this question
or