angular-ui-grid

external-scopes no longer works in ui-grid

我的梦境 提交于 2019-12-06 01:24:00
I am upgrading the ui-grid from v3.0.0-RC.18 to v3.0.0-rc.20-76029e7 and suddenly the external-scopes attribute stops working. What is the alternative to it? externalScopes was removed in RC 19. You can read the notes here: https://github.com/angular-ui/ng-grid/blob/master/CHANGELOG.md#breaking-changes Instead, you can use appScope , which has been docoumented here: http://ui-grid.info/docs/#/tutorial/305_appScope The grid gets a property called appScope added to it that simply references its parent scope, so you don't have to pass the grid any options. If you have a function named click() on

Angular ui-grid tables, client side pagination and scrolling

梦想的初衷 提交于 2019-12-05 19:34:35
I'm trying to port a small project from jquery to angularjs. I was using DataTables to plot diagnostic data received from my virtual machines, this is an example: DataTables makes it easy to paginate the data, this has the benefit of not capturing the mouse scroll while navigating, which is the best solution when your pages contain a lot of tables. I'm now trying to do the same thing using ui-grid from angular-ui but the pagination options that were present in ng-grid are not present anymore (or at least I wasn't able to find them). Is there a way to do client side pagination using ui-grid?

angularjs-ui-grid has extra white space after scrolling to the bottom of the list

痴心易碎 提交于 2019-12-05 19:33:15
When I have enough rows in my ui-grid to do scrolling, it seems to have a lot of whitespace at the bottom of the list for some reason. I've nailed it down to this piece of code (i think?): styles['margin-top'] = hiddenRowWidth + 'px'; line 3038 of ui-grid.js Not sure why it's adding so much white space at the bottom though. Any ideas? I was thinking it's because my container is 100% height, but it seems to do this even with a specific pixel height as well. edit: Well, now I'm not certain that it was that code that's the culprit. The ui-grid-canvas element has a HUGE height, still not sure why.

Column header wrapping when using Angular ui-grid

痴心易碎 提交于 2019-12-05 16:54:52
问题 I have upgraded my AngularJS SPA application from ng-grid v2.0.7 to ui-grid v3 and my column headers no longer wrap around. My column headers are now single lined and show an ellipsis ... when the column header doesn't fit. Has this feature been removed or is had it been superseded by a different method? 回答1: I believe I have found a way of wrapping text in the header columns by overriding the ui-grid-cell-contents CSS class. .ui-grid-header-cell .ui-grid-cell-contents { height: 48px; white

angular ui-grid event: row selected

ぐ巨炮叔叔 提交于 2019-12-05 11:19:22
问题 I am trying to enable/disable a button based on the selection of a row on a ui-grid. If there are no rows selected, the button is disabled. I found this plunkr with the old ng-grid way of firing an event after a row is selected. $scope.gridOptions = { data: 'myData', selectedItems: $scope.selections, enableRowSelection: true, afterSelectionChange:function() { if ($scope.selections != "" ) { $scope.disabled = false; } else { $scope.disabled = true; } } }; Unfortunately it does not work, and I

Angular ui grid double click event setup

对着背影说爱祢 提交于 2019-12-05 09:42:46
So I'm trying to get my Angular UI Grid to register a double click event on an entire row to open up a modal. I can start with a toastr toast and go from there though. This is the closest I've come based on various demos and examples online, but I just can't seem to get it to work. Controller: $scope.gridHandlers = { onDblClick: function(rowItem){ toastr.success(rowItem, 'Row Item:') } } $scope.gridOptions = { onRegisterApi : function(gridApi){ $scope.gridApi = gridApi }, data: $scope.customerList, enableRowHeaderSelection: false, enableRowSelection: true, enableSelectAll: false, multiSelect:

UI-GRID - Dynamic Row Height - Alternatives

别等时光非礼了梦想. 提交于 2019-12-05 08:49:46
I tried to get a cell to expand it's height dynamically. Is there a way to adjust the height of a row(GridRow) after it is rendered? If not, then I will try to use an expandable grid or tree in a grid. Is it possible to display an expandable grid off a specific cell/column? Currently I see all expandable grids/tree grids that take up the entire row below the parent. Thanks You can see an answer to the same question here: https://github.com/angular-ui/ng-grid/issues/3239#issuecomment-91045267 UI-Grid virtualizes the rows, meaning that it only renders a small subset of the data, and leaves

Angular ui-grid external export buttons

旧时模样 提交于 2019-12-05 04:50:34
I am new working with the Angular UI-GRID and I need to create external buttons for the exporting features like PDF export and CSV Export similar to this image . Do you have any idea how can I do it ? Also I need a Print button but I don't see it in the documentation. Is there a Print behavior for this grid ? Thank you, Ernesto Taking a look at the ui-grid.exporter source code (this will specifically address pdf export, which starts at ~line 972, but you can apply it to the csv use case as well), you would want to create an external button in your html, then tie the uiGridExporterService 's

Change the MenuItem icon in angular ui.gird

纵然是瞬间 提交于 2019-12-05 04:11:27
问题 How to toggle the customizing_column_menu icons in angular ui.grid like shown below 回答1: I didn't found any best solution to change menuItems dynamically, Here is what I did for workaround Code $scope.gridOptions = { rowHeight: 75, columnDefs: [{ field: 'name', enableColumnMenu: false }, { field: 'gender', enableHiding: false, suppressRemoveSort: true, sort: { direction: uiGridConstants.ASC } }, { field: 'All Details', cellTemplate: '<p ng-show="grid.appScope.company"><label><b>Company:</b><

How to make Angular ui grid expand all rows initially?

℡╲_俬逩灬. 提交于 2019-12-05 02:59:41
I am using ui grid to show a list of data and I am trying to initially expand all rows. I am trying to do this in the onRegisterApi event: scope.GridOptions = { data: properties, columnDefs: [ { name: "Full Address", field: "FullAddress" }, { name: "Suburb", field: "Suburb" }, { name: "Property Type", field: "PropertyType" }, { name: "Price", field: "Price", cellFilter: 'currency'}, { name: "Status", field: "Status" }, { name: "Sale Type", field: "SaleType" }, { name: "Date Created", field: "CreateDate", cellFilter: "date:'dd/MM/yyyy HH:mma'"} ], expandableRowTemplate: 'template.html',