-1

How to disable the pinning in UI Grid for AngularJs?? Even after setting enablePinning:false or enableGridMenu: false It is not work

app.js file:

 var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.pinning']);

 app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) {
 $scope.gridOptions = {};

 $scope.gridOptions.columnDefs = [
 { name:'id', width:50, enablePinning:true, hidePinLeft: false, hidePinRight: true },
 { name:'name', width:100, pinnedLeft:true },
 { name:'age', width:100, pinnedRight:true  },
 { name:'address.street', width:150  },
 { name:'address.city', width:150 },
 { name:'address.state', width:50 },
 { name:'address.zip', width:50 },
 { name:'company', width:100 },
 { name:'email', width:100 },
 { name:'phone', width:200 },
 { name:'about', width:300 },
 { name:'friends[0].name', displayName:'1st friend', width:150 },
 { name:'friends[1].name', displayName:'2nd friend', width:150 },
 { name:'friends[2].name', displayName:'3rd friend', width:150 },
];

 $http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500_complex.json')
 .then(function(response) {
  $scope.gridOptions.data = response.data;
 });
}]);

http://ui-grid.info/docs/#!/tutorial/Tutorial:%20203%20Pinning

1
  • No..it still shows pinning.. Commented Jul 27, 2020 at 6:12

1 Answer 1

0

Enable pinging property need to set for gridOptions to disable in overall all gird

  $scope.gridOptions = {
    enablePinning:false
  };

Also can set the property to specific column, disbaled for name column in plunker

Working Plunker

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.