Try using the ng-click directive
Your html button might look like this:
<input type="button" ng-click="toggleCol(0)" />
and your js like this
var app = angular.module('myCoolGridApp', ['ngGrid']); app.controller('MyCtrl', function ($scope) { $scope.toggleCol= function(i) { $scope.gridOptions.$gridScope.columns[i].toggleVisible() } }
source share