Skip to content Skip to sidebar Skip to footer

Use Angularjs Ui-grid With Table

I am using AngularJS ui-grid in my aplication. I have some table for example with 50-100 rows, nevermind. Now i want to use ui.grid.autoresize module which will dinamically resize

Solution 1:

try this...

angular.module('app',['ui_grid','ui.grid.autoResize']).controller('MainController',[$scope,uiGridConstants]){
    $scope.gridData = {
       roweight : 30,
       data:[]
     };

     //I am populating data with uploaded files$scope.gridData.data = $scope.uploadedFiles;
     var rowHeight = 30;
     var headerHeight = 30;
     var height = $scope.gridData.data.length * rowHeight + headerHeight + "px"
     $('.grid').css('height',height + ' !important');
}

and add class to table..

<table ui-grid="gridData" ui-grid-auto-resize class="grid">

Post a Comment for "Use Angularjs Ui-grid With Table"