Search Posts

Category: angular-ui-grid

ui-grid pagination page forward buttton not disabled even with 0 record

I am using ui-grid for my tables, with externalpagination and externalfiltering set to true. When the $http returns no record after searching, the page-forward button should be disabled, but it doesn’t, which cause issues ahead. Here’s an image Here’s the image of it, which shows the button still visible. Please help me out. Stuck with this for a while Source: AngularJS

Angular UI Grid saveState not working

I’m trying to save the state of the grid and im getting Unable to get property ‘saveState’ of undefined or null reference When the save button is pressed. grid.js var vm = this; vm.gridOptions = { exporterMenuCsv: true, enableGridMenu:true, enableSorting:true, enableFiltering: true, onRegisterApi: function(gridApi){ $scope.gridApi = gridApi; } }; $scope.state = {}; $scope.saveState = function(){ console.log(“Saving state”); $scope.state = $scope.gridApi.saveState.save(); console.log(“Saving successful”); }; $scope.restoreState = function(){ console.log(“Restoring state”); $scope.gridApi.saveState.restore( $scope, $scope.state ); console.log(“Restore successful”); }; […]

angularjs uigrid checkboxes tracking

I’m new to angular and I’m stuck on trying to bind a custom checkbox to an object. I’ve created a plnkr to illustrate the issue. Essentially I want trying to get the checkboxes to change the checkbox object by the row’s id. Ideally the checkboxes will match the row after sorting or filtering which it’s not currently doing. Currently I don’t think it’s updating the checkbox object at all. http://plnkr.co/edit/M42gzWlulwCLmmy3VHaZ?p=preview Any idea how the cellTemplate […]

TypeError: XXX undefined with AngularJS $inject Property annotation

Angular UI Grid Get Cell Vaule I am using angular grid ui and I am trying to get the vaule of cell based on the row and column using getCellValue. I am getting the error Unable to get property ‘$$undefined’ of undefined or null reference How do I get the vaule from a cell based on the row and the column? angular.module(‘app’, [‘ngAnimate’, ‘ngTouch’, ‘ui.grid’,’ui.grid.resizeColumns’,’ui.grid.pinning’,’ui.grid.grouping’, ‘ui.grid.moveColumns’,’ui.grid.exporter’,’ui.grid.selection’,’ui.grid.selection’, ‘ui.grid.cellNav’]).controller(‘MainCtrl’, MainCtrl); MainCtrl.$inject = [‘$http’, ‘uiGridConstants’,’$interval’,’$scope’]; function MainCtrl($http, uiGridConstants,$scope) […]

uigrid remove initial blank option from dropdown filter

Here’s the screenshot of my ui-grid. Here’s the code that creates that filter. { field: ‘channel_type’, displayName: “Type”, filter: { type: uiGridConstants.filter.SELECT, selectOptions: [ { value: ‘HD’, label: ‘HD’ }, { value: ‘SD’, label: ‘SD’ } ] }}, { field: ‘price’, displayName: “Price”, enableFiltering: false, enableSorting: false}, My data is loaded in uigrid from rest api call. I really can’t figure it out from where is it adding that blank option. I haven’t found any […]

How to refresh automatically Angular UI Grid after adding data

I have angular UI-Grid which I want to reload after the data is added. Please let me know what do I need to add? HTML File <form class=”form-main”> <label>Category Name</label> <input type=”text” id=”txtCategory” ng-model=”md_catname” /> <button id=”btnAdd” type=”submit” class =”button-internal” ng-click=”Add()”>Add</button> <div class=”gridBigStyle” ui-grid=”gridCategory” ui-grid-edit ui-grid-pagination> </form> Controller File var myApp = angular.module(‘appHome’); myApp.controller(“ctrlCategory”, [‘$scope’, ‘MetadataOrgFactory’, ‘CommonFunctionFactory’, function ($scope, MetadataOrgFactory, CommonFunctionFactory) { $scope.gridCategory = { data: ‘categoryData’, columnDefs: [ { field: ‘CategoryName’, displayName: ‘Name’, }, […]

I cannot filter empty values in ui-grid

I’m receiving an error every time I filter null values in a filter modal saying : angular-1.6.5.min.js:123 TypeError: Cannot read property ‘grid’ of null at Object.link (ui-grid.js:26601) at angular-1.6.5.min.js:17 at ua (angular-1.6.5.min.js:85) at q (angular-1.6.5.min.js:71) at f (angular-1.6.5.min.js:62) at angular-1.6.5.min.js:61 at angular-1.6.5.min.js:67 at d (angular-1.6.5.min.js:64) at m (angular-1.6.5.min.js:68) at angular-1.6.5.min.js:315 div ng-repeat=”(colRenderIndex, col) in colContainer.renderedColumns track by col.uid” ui-grid-one-bind-id-grid=”rowRenderIndex + ‘-‘ + col.uid + ‘-cell’” class=”ui-grid-cell ng-scope” ng-class=”{ ‘ui-grid-row-header-cell’: col.isRowHeader }” role=”{{col.isRowHeader ? ‘rowheader’ : […]

Next Page »