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

How do you get the Grid's model from the row element

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ramesh
Top achievements
Rank 1
Ramesh asked on 18 Aug 2014, 03:55 PM
I have extended the default grid and am overriding the removeRow event. The handler get a reference to the "row" which is the rendered tr (HTML)

I can get the model that is bound to that row via

var model = this._modelForContainer(row)

However, how do I get access to the model instance that is bound to the grid? I have a specific method on the model that needs to be invoked from the removeRow event handler.

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 19 Aug 2014, 09:15 AM
Hi Ramesh,

Please note that extending the Kendo UI widgets falls outside the scope of our support service as it covers the build-in functionality of the controls only.
Also the "_modelForContainer" method returns the instance that is in the dataSource (also bind to the grid) using the "getByUid" method which you can use to achieve the desired behavior.

Regards,
Vladimir Iliev
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
Ramesh
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or