Search Posts

Category: ui-grid

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 […]

ui-grid not showing data angularjs

Can someone please help me. I want to implement data display using ui-grid. But the grid is not displaying data just showing blank yet when i use table with <tr ng-repeat=”transaction in savingaccountdetails.transactions> data is displayed. I want to use ui-grid because of the ability to have fixed header while scrolling for large data but its so hard to make table header fixed, most times columns don’t align. i tried most cases but not working […]

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