var gridApp;
(function (gridApp) {
    'use strict';
    var GridController = (function () {
        function GridController($scope, $http) {
            this.$scope = $scope;
            this.$http = $http;
            console.log('About to call pop grid');
            this.populateGrid();
            this.$scope.hideColumnClick = function (event) {
                this.hideColumns();
            };
        }
        GridController.prototype.populateGrid = function () {
            this.$scope.gridOptions = {
                dataSource: {
                    type: "odata",
                    transport: {
                        read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                    },
                    pageSize: 15,
                    group: { field: "ContactTitle" }
                },
                height: 500,
                groupable: true,
                sortable: true,
                selectable: "multiple",
                reorderable: true,
                resizable: true,
                filterable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true,
                    buttonCount: 5
                },
                columns: [
                    {
                        field: "ContactName",
                        template: "<div class='customer-photo' style='background-image: url(http://demos.telerik.com/kendo-ui/content/web/Customers/${data.CustomerID}.jpg);'></div><div class='customer-name'>#: ContactName #</div>",
                        title: "Contact",
                        width: 200
                    }, {
                        field: "ContactTitle",
                        title: "Contact Title",
                        width: 220
                    }, {
                        field: "Phone",
                        title: "Phone",
                        width: 140
                    }, {
                        field: "CompanyName",
                        title: "Company Name"
                    }, {
                        field: "City",
                        title: "City",
                        width: 120
                    }
                ]
            };
        };
        GridController.prototype.hideColumns = function () {
            var self = this;
            var grid;
            grid = this.$scope.gridRecords;
            console.log('hideColumns called');
            grid.hideColumn(1);
        };
        GridController.$inject = ['$scope', '$http'];
        return GridController;
    })();
    gridApp.GridController = GridController;
    angular.module('gridApp.controllers', []).controller('gridController', GridController);
})(gridApp || (gridApp = {}));
//# sourceMappingURL=gridController.js.map