0
vm.gridOptions = {
        enableSorting: true,
        columnDefs: [
            {field: 'deviceName'},
            {field: 'ip'},
            {
                field: 'Action', enableSorting: false,
                cellTemplate: '/monitoring_page/modals/buttonTemplate.html'
            }
        ],
        data: vm.dataStack,
        onRegisterApi: function (gridApi) {
            vm.gridApiSource = gridApi;
        }
    };

This is my ui-grid grid option.

in which I am declaring vm.gridApiSource but it not bounding to vm.

I am assigning var vm = this;

Please give hint why gridApiSource not bounding to this;

my plunker link http://plnkr.co/edit/Oxo8XdQCysOUvfvhD82z?p=preview

When I press delete icon and delete option on the modal. It will throw error gridApiSource is undefined.

  • it will happen only when `onRegisterApi` is called, where is the call for that function?? – harishr Jul 22 '16 at 06:09
  • Does it call when ui-grid="gridOptions" assigning to div in HTML? because I am getting value for vm.gridApiSource in controller loading inside at onRegisterApi function. – Uday Malangave Jul 22 '16 at 06:23
  • Yes and I make a mistake. When I back from controller my controller reloading so it is undefined. So i made a service for it. – Uday Malangave Aug 03 '16 at 05:53

0 Answers0