1

Using ui-grid with AngularJs I am trying to make whole row editable but getting error in it.

Please check the plnkr link where I did whole coding and let me know what I did wrong.for plnkr link click here

Below is the error which I am getting. I tried to resolve it but get another error.

TypeError: Cannot read property 'rowEdit' of undefined
    at Object.<anonymous> (app.js:84)
    at Object.invoke (angular.js:4604)
    at extend.instance (angular.js:9855)
    at nodeLinkFn (angular.js:8927)
    at compositeLinkFn (angular.js:8226)
    at compositeLinkFn (angular.js:8229)
    at compositeLinkFn (angular.js:8229)
    at publicLinkFn (angular.js:8106)
    at angular.js:1696
    at Scope.$eval (angular.js:16820)
Jarod Moser
  • 7,022
  • 2
  • 24
  • 52
Sahil
  • 75
  • 7

1 Answers1

0

I have forked your Plunk and fixed the errors, here it is: http://plnkr.co/edit/m9lYb15SyTdkkHmkaJpu?p=preview

There were multiple problems, the main one is that you did not load all stuff that ui-grid used in code further, you had:

var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'ui.grid.cellNav']);

and there was needed:

var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'ui.grid.cellNav', 'ui.grid.selection', 'ui.grid.rowEdit']);

So 'ui.grid.selection', 'ui.grid.rowEdit' were missing.

michal.jakubeczy
  • 8,221
  • 1
  • 59
  • 63