how to access datasource child

2 posts, 0 answers
  1. Federico
    Federico avatar
    21 posts
    Member since:
    Oct 2017

    Posted 25 Oct 2017 Link to this post

    how to access datasource child.


    <div id="a" data-role="grid"
                            data-excel='{fileName: "ok.xlsx", proxyURL: "",filterable: true}'
                            data-pageable='{ "pageSize": 10}'
                            data-no-records= "true"
                                        { 'field': 'a.nome','title':'nome'},
                                        { 'field': 'a.stato','title':'stato'}
                            data-bind="source: GridSource,events:{detailInit: onDetailInit}">
            <script id="templateSubGrid" type="text/x-kendo-template">
                <h4>ciao ciao </h4>
                <div id="Subgrid"
                    data-bind="source: GridSource.b"
                           { 'field': 'name','title':' name'},
                        { 'field': 'company','title':'company'},




    this.vm = kendo.observable({
                       var dataItem = $("#Subgrid").data("kendoGrid").dataItem(e.masterRow);
                    kendo.bind("#Subgrid", dataItem);
            kendo.bind($("#m"), this.vm);
    //GridSource is filled with the ajax function


    The response is like this:



    'b' must be the data source of the detailtemplate grid.




  2. Martin
    Martin avatar
    833 posts

    Posted 27 Oct 2017 Link to this post


    Let me know whether this DoJo example works as expected for your scenario.

    Progress Telerik
    Try our brand new, jQuery-free Angular 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