ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

expandable grid error when expanding

Open jmorrisIII opened this issue 12 years ago • 5 comments

When I click to expand the grid i get an error "TypeError: Cannot read property 'expandableRowHeight' of undefined" and "TypeError: Cannot read property 'rowExpandableTemplate' of undefined". I referenced 'ui.grid.expandable' in my app.js. Any Ideas?

jmorrisIII avatar Oct 24 '14 15:10 jmorrisIII

It may mean you haven't set those values, or that you haven't set one of the other expandable mandatory parameters. Expandable has rather poor error handling at present - it just assumes you know what you're doing and that all it's values are present. I'd start by adding every single value that's present in the tutorial, and then work backwards removing them until you find out which one is causing the error.

PaulL1 avatar Oct 25 '14 00:10 PaulL1

I wasn't using the proper version of ui-grid

jmorrisIII avatar Nov 12 '14 17:11 jmorrisIII

I'm using rc-12, and I got same error. I have to change it to $scope.gridOptions = { data: [], expandable: { expandableRowTemplate: '

', rowExpandableTemplate: '
', expandableRowHeight: 140, expandableRowScope: { subGridVariable: 'subGridScopeVariable'}, }, }

And I don't know what conflict I have, my expandable icon column is on top, and real data table is under that, close to the ui-grid-container end.

I'm new to AngularJS, Appreciate any help.

yleigh avatar Dec 03 '14 20:12 yleigh

OK. I changed to rc-16 and the way as 'expandable grid' in tutorial seems working.

yleigh avatar Dec 03 '14 22:12 yleigh

For whoever might stumble on this having issues with the expandable grid: the expandableRowScope in the tutorial is not used so it may be a red herring with your debugging.

ghost avatar Jul 05 '16 18:07 ghost