Get data from AngularJS Grid

2 posts, 0 answers
  1. Danny
    Danny avatar
    3 posts
    Member since:
    Dec 2014

    Posted 25 Jul 2017 Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    3073 posts

    Posted 27 Jul 2017 Link to this post

    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.
Back to Top