Search Posts

Category: ui-grid

Angular ui-grid group header cell position

Currently when we do grouping on 2 columns, the group header value shows on grid but the group name is shown on top of each cell that is grouped. Plunker This is my current cell template <div><div ng-if=”!col.grouping || col.grouping.groupPriority === undefined || col.grouping.groupPriority === null || ( row.groupHeader && col.grouping.groupPriority === row.treeLevel )” class=”ui-grid-cell-contents” title=”TOOLTIP”>{{COL_FIELD CUSTOM_FILTERS}}</div></div> Is there a way to always show the group name on 1st column , regardless of priority ? […]

How to cancel cell editing in Angular ui-grid?

I have some condition in beginCellEdit event gridApi.edit.on.beginCellEdit($scope, function(rowEntity, colDef, event) { var scope = angular.element(event.currentTarget).scope(); var selectedRowIndex = scope.rowRenderIndex; var selectedColumnName = scope.col.name; if ($scope.gridOptions.data[selectedRowIndex-1][selectedColumnName].trim()==”) { alert(“You cannot enter the value in this cell”); // At this place I want to cancel edit and return focus to grid } }) Is there any preventDefault or similar method so can easily cancel the cell editing and return focus to grid. Thank you! Source: AngularJS

AngularJS UI-Grid preserved state

I need to make a preserve state in AngularJs when i go from a page to another page and come back, the functionality i have created, but the problem is with ui-grid. When i come back to the page with ui-grid table i need that all the fields which i filled to be filled back with the data. I have the data but i don’t know how to access the filters input. Here the filters […]

ui-grid cellTemplate images not displaying

I am upgrading from ng-grid to ui-grid for an angularjs itunes app and I’m having some difficulty getting album image and view icon to display inside my ui-grid, it seems to have trouble binding to the img tags. The View icon should be linked to a url (see below). inside my $scope.gridOptions… {field: ‘View’, displayName: ‘View’, width: 60, cellTemplate: ‘<div class=”ui-grid-cell-contents ng-binding ng-scope” ng-class=”col.colIndex()”><a ng-href=”grid.getCellValue(row, col)”><img ng-src=”https://images.onlinelabels.com/images/clip-art/emyller/emyller_magnifying_glass.png” height=”30px” width=”30px” lazy-src /></a></div>’}, {field: ‘AlbumArt’, displayName: ‘Album […]

Angular ui-grid adding new row dynamically

I am having a problem with the newly added row. It inherit the row in the grid (the buttons and behavior). The code is working adding a new row but I want a new row with the behavior in the AddOverride() function. Like a button with save and cancel button. Also when I add a new row. the new row >has the update and delete button. When I try to click update on the newly […]

RowTemplate gets overriden by Cell Template in UI-Grid

I have an ui-grid that sets the background color of each row based on the value of one of the data fields. One of the columns is a boolean that I’d like to show as a checkbox. The rows get colored as desired except in the first column, the checkbox. If I remove the column celltemplate instruction, it works (the cell gets colored) so Im guessing my checkbox template is not accurate or that it […]

Difference between name and field in ColumnDefs for ui-grid (AngularJS)?

Can anyone provide a practical example? From my understanding, field refers to the actual field you want to reference. That is, field should be the name of the variable (in the code) that you want to put in the table. displayName is more clear: it just specifies how the column name will be displayed in the table. This seems to be everything you need. What is the purpose of “name” then? Here is the documentation […]

Next Page »