Click here to Skip to main content
15,916,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to use ng-grid in asp.net page
Posted
Comments
ZurdoDev 4-Feb-15 8:02am    
There are lots of samples online. Where are you stuck?

1 solution

<div class="ngGridStyle" ng-grid="myGrid"></div>

in js file:
PHP
var myAppRoot = angular.module('myApp', ['ngGrid']);

 myAppRoot.controller('MyngGridCtrl', function($scope) {

 //define some object here
$scope.myData=[{ ID:1, Name:'John',Country:'USA'},
            {ID:2, Name:'Sachin' , Country:'India'},
            { ID:3, Name:'Smith' , Country:'UK'} ];

 //now add the above object to your ngGrid
$scope.myGrid={data:'myData'};
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900