I have to point out the irony of requiring the *addition *of a hard-coded
hack in order to *disable *such an opinionated feature.
Creation of a scroll pane should be an optional add-on feature that's
enabled by default, not one you have to hack your way to remove. Have we
learned nothing from jQuery spaghetti code days?
On Wednesday, June 12, 2013 7:41:50 PM UTC-4, Joe Hanink wrote:
>
> you want ng-grid to initialize after you have data.
>
> The following solution requires using angular-ui.
>
> <div ui-if="dataForGrid.length>0" ng-grid="gridOptions"
> ng-style="getTableStyle()" />
>
> $scope.getTableStyle= function() {
> var rowHeight=30;
> var headerHeight=45;
> return {
> height: ($scope.dataForGrid.length * rowHeight + headerHeight) + "px"
> };
> };
>
> On Thursday, January 17, 2013 3:41:14 AM UTC-8, m48u wrote:
>>
>> Hi,
>> I don't know if there is an option in ng-grid but you could make use of
>> your data.
>> add a style attribute to your grid container like
>>
>> <div ng-grid="gridOptions" style="height: {{dataForGrid.lenght() *
>> rowHeight}}px" />
>>
>> maybe this does not work on the fly but hopefully you know what I mean
>>
>> Cheers
>>
>> Am Sonntag, 13. Januar 2013 13:35:37 UTC+1 schrieb Nathan Smith:
>>>
>>> Is there a way to specify the height of a ng-grid table to be the
>>> maximum height of all displayed rows? I'd rather have the user scroll the
>>> page than the grid.
>>>
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.