Search Posts

Category: angular-ui-grid

Show children’s while filtering angular UI grid tree view

I am using angular UI grid tree view with large set of data in a parent-child relationship. When I am applying a filter, it’s giving me the correct data, but what I want is if that row has children, then those children also need to be shown. It doesnt matter if the child row has that filtered data or not, those need to be shown. Here is plnkr i have created with some sample data. […]

Why I only can access data in html, but not in controller (AngularJS, not angular)

I am using angularjs. In my controller, I call a service’s function, then assign return data to a variable (like vm.allTemplatesFromClassificationRepo). But I do not know when I access to vm.allTemplatesFromClassificationRepo in the controller, it is undefined, but when I access to this variable, it has data (not undefined). I do not know if this because of promise issue? I want to find a way that I can get this variable’s value in the controller, […]

Angular ui grid tree view cell background color

I have a angular ui grid using tree view. I am struggling to get some css going for the cell background. When the tree nodes are in the collapsed state, they have a alternating white and grey colors. When the tree node with white color is expanded by pressing the plus icon, I would like all the cells under it to also have white color(rather than the alternating grey and white) and similarly when the […]

enableSelection and uiGridConstants

I’m trying to get rows selectable only with a certain $treeLevel. The console returned a ReferenceError: uiGridConstants is not defined. I have to admit that I don’t fully understand what uiGridConstants stands for. Here is my code: onRegisterApi: function (gridApi) { this.gridApiBatches = gridApi; console.info(gridApi); gridApi.grid.options.enableSelection = function (row) { if (row.entity.$treeLevel != 3) { return false; } else { return true; } }; gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS); Source: AngularJS