This is a migrated thread and some comments may be shown as answers.
Get data from AngularJS Grid
1 Answer 59 Views
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 1
Danny asked on 25 Jul 2017, 02:56 PM

I am having issue getting my data from an AngularJS Grid.

 <kendo-grid id="grid" options="mainGridOptions"></kendo-grid>

 

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

this does not pull the data.

 

How do i get the data from the grid?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Jul 2017, 07:22 AM
Hello Danny,

Thank you for the provided code.

I made a testing example based on the provided code and the data was retrieved as expected:

http://dojo.telerik.com/uKeWu

I can assume that this may be caused by a timing issue, as the Grid may not be available at that moment.

Also, I can suggest checking how to retrieve the Kendo UI widget instance using an AngularJS approach:

http://docs.telerik.com/kendo-ui/AngularJS/introduction#widget-references

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Danny
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or