PolyMath-book icon indicating copy to clipboard operation
PolyMath-book copied to clipboard

No ID provided. An ID must be given when creating a grid.

Open marchrius opened this issue 8 years ago • 6 comments

This error occur when using ui-grid and angular-widget-grid in same project.

The Grid factory will be replaced by ui.grid.Grid

UPDATE: If I load the widgetGrid befaore the ui.grid all works.

marchrius avatar Oct 18 '16 12:10 marchrius

Hello, I have the same error even if I load the ui-grid after the angular-widget-grid Have you an issue ?

W-prog avatar Jan 18 '17 13:01 W-prog

@W-prog no, I solved the issue by loading widgetGrid before ui.grid.

It will be better if the maintainer changes the object name with a prefix or something else.

marchrius avatar Jan 19 '17 09:01 marchrius

Oh yeah, i've trying load widget-grid before but the error is more large for example : TypeError: Cannot read property 'length' of null at ui-grid.js:3277

Yes for "It will be better if the maintainer changes the object name with a prefix or something else" Have you an idea where in librairie I do that ? I see on line 161

vm.grid = new Grid($scope.rows, $scope.columns); For rename the var Grid but i think i do rename all on the lib

W-prog avatar Jan 19 '17 09:01 W-prog

Yes, you have to replace all the occurrences of "Grid" into the lib.

marchrius avatar Jan 19 '17 09:01 marchrius

Hello guys ! Thanks for the tip, we actually needed to change Grid to someNameGrid AND gridUtil to someNameGridUtil.

Just saying in case someone needed it !

sebius8780 avatar Jan 19 '17 10:01 sebius8780

@W-prog @sebius8780 At the moment I've found a work around for this (I forgotten it).

#13 In this PR there is a commit about force inject the correct Grid.

marchrius avatar Jan 23 '17 08:01 marchrius