khan4019 / tree-grid-directive

Need one or more maintainer for this! comment or email me if you are interested
http://khan4019.github.io/tree-grid-directive/test/treeGrid.html
347 stars 183 forks source link

Add any option #40

Closed thienhung1989 closed 9 years ago

thienhung1989 commented 9 years ago

Add option: cellClass, cellStyle, titleClass, titleStyle (use ng-style, ng-class)

Example:

            $scope.expanding_property = {
                field:       "name",
                titleStyle: {'width': '80pt'},
                titleClass: 'text-center',
                cellClass: 'v-middle text-center',
                displayName: $translate.instant('system.category.menu.name')
            };

            $scope.col_defs = [
                {
                    field: "description",
                    displayName: $translate.instant('system.category.menu.description')
                },
                {
                    field: "url",
                    displayName: $translate.instant('system.category.menu.url')
                },
                {
                    field: "show",
                    titleStyle: {'width': '80pt'},
                    titleClass: 'text-center',
                    cellClass: 'v-middle text-center',
                    displayName: $translate.instant('system.category.menu.show'),
                    cellTemplate: "<i class=\"fa fa-check text-{{ !row.branch.show ? 'danger' : 'success' }} text\"></i>"
                }];