We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Child Grid with AngularJS

Thread ID:

Created:

Updated:

Platform:

Replies:

121468 Dec 17,2015 12:00 PM UTC Dec 18,2015 08:59 AM UTC JavaScript 1
loading
Tags: ejGrid
Rob ONeill
Asked On December 17, 2015 12:00 PM UTC

Hi,
I am trying to get a ChildGrid to work with angularjs but it nevers seems to render. What am I doing wrong ?


Cheers .... Rob.

Ragavee U S [Syncfusion]
Replied On December 18, 2015 08:59 AM UTC

Hi Rob,

Thanks for contacting Syncfusion support.

We analyzed your requirement to render child grid using angularjs. We can define the child grid properties within the scope variable of the childGrid property of ejGrid. Please refer to the below code example.

<div id="Grid" ej-grid

     e-datasource="data" e-columns="columns" e-childgrid="child"

     e-pagesettings-pagesize="8" e-allowpaging="true">
</div>

<script type="text/javascript">

    angular.module('listCtrl', ['ejangular'])

        .controller('PhoneListCtrl', function ($scope) {

            . . . . .

           $scope.child = {

                dataSource: childobj,

                queryString: "EmployeeID",

                columns: [

                            { field: "ChildID", headerText: "Child ID", textAlign: "right", width: 100 },

                            { field: "LastName", headerText: "Last Name", textAlign: "left", width: 100 },

                            { field: "FirstName", headerText: "First Name", textAlign: "left", width: 100 },

                            { field: "City", headerText: "City", textAlign: "left", width: 100 },

                            { field: "Country", headerText: "Country", textAlign: "left", width: 100 }

                ]

            };

        });
</script>


For your convenience, we have modified your sample with the above solution, which can be downloaded from the below location

http://jsplayground.syncfusion.com/503cuce4

Regards,
Ragavee U S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;