angular-ui-grid

Angular UI-Grid and D3 graph in a row

做~自己de王妃 提交于 2019-12-05 02:34:35
问题 I am wondering if any of you had any experience with injecting a graph into a ui-grid. What I am doing, is I have a row defined as follows: { name:'Column Name', cellTemplate: '<spark-line-chart values="grid.appScope.valuesStacked"></spark-line-chart>'} Spark-line-chart directive is responsible for creating a D3 chart (actually, nvd3 to be precise). This creates svg graph. Now, each time I am trying to sort my table, all of the values within the table get sorted, apart from the graphs. So far

How to access the sorted rows in an Angular UI Grid?

你说的曾经没有我的故事 提交于 2019-12-05 01:17:12
I am using the Angular UI Grid to display some data. Sorting is enabled and initialized as well as selecting a single row: vm.gridOptions = { enableSorting: true, enableRowSelection: true, multiSelect: false, noUnselect: true, columnDefs: [ { name: '#', field: 'ID' }, { name: 'Name', field: 'CODE', sort: { direction: 'asc', priority: 1 } }, { name: 'Comment', field: 'DESCR' }, ], data: [] }; I am able to select a row and the rows are sorted by the "Name" column in ascending order as configured. As shown in the UI Grid Tutorial 210 , I have added logic to automatically select the first item

Problems getting Bootstrap DateRangePicker to work in filterHeaderTemplate with Modal popup in UI-Grid

六月ゝ 毕业季﹏ 提交于 2019-12-04 22:32:22
I'm trying to add a bootstrap DateRangePicker in the Filter Header Template for an Angular UI-Grid. I can see that the template is working properly because it shows the Bootstrap Icon. I do not want to use the native angular Type:'date'. I want to use a bootstrap date picker. I have a Plunker as an example further down, that shows the native datepicker working and the Bootstrap Datepicker button clickable but not displaying anyting. I have all the includes needed for this to show up. <!-- Include Required Prerequisites --> <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1/jquery

Hide horizontal scrollbar (Angular ui-grid)

风格不统一 提交于 2019-12-04 22:20:14
I'm trying to hide the horizontal scrollbar of a Angular ui-grid, but I can't find the right property. (Property enableScrollbars=false removes both.) Is it possible to remove only the horizontal scrollbar? nabinca With the latest version on Github v3.0.0-rc.16 you can disable horizontal and vertical Scrollbar separately. Instead of enableScrollbars = false; use enableHorizontalScrollbar = value; enableVerticalScrollbar = value; with value = 0; /* NEVER */ value = 1; /* ALWAYS */ value = 2; /* WHEN_NEEDED */ UPDATE: If you want to use constants instead of the integer-value, look at

angular-ui-grid pagination missing

夙愿已清 提交于 2019-12-04 18:21:35
I have an ui-grid options as follows { "enableHorizontalScrollbar":false, "enableHiding":false, "enableColumnResizing":true, "enableSorting":true, "enableColumnResize":true, "paginationPageSize":20, "enablePagination":true, "enablePaginationControls":true, "columnDefs":[ // skipped for clarity ], "data":"griddata", "excludeProperties":[ "$$hashKey" ], "enableRowHashing":true, "showHeader":true, "headerRowHeight":30, "rowHeight":30, "maxVisibleRowCount":200, "minRowsToShow":10, "showFooter":false, "footerRowHeight":30, "columnWidth":50, "maxVisibleColumnCount":200, "virtualizationThreshold":20,

Angular ui grid, change behavior of “Export all data as csv”

会有一股神秘感。 提交于 2019-12-04 16:37:15
I have a uigrid that contains a large number of column definitions that aren't initially filled with data because the data set would be too large. Instead, I get the requested column data when the column visibility changes. This causes an issue with the built in csv exporter. When someone chooses to "Export all data as csv" they get numerous empty columns. What I would like to do it change the default behavior of the built in csv menu items to use uiGridExporterConstants.VISIBLE. I was going to roll my own menu items like so: $scope.gridOptions.exporterMenuCsv = false; //Rolling our own menu

UI Grid Angular, grid renders but doesn't display data

女生的网名这么多〃 提交于 2019-12-04 13:27:38
问题 What am I missing here? The grid renders with no errors, blank rows... I checked and JSON is coming in fine up to this point $scope.gridOptions.data = response['data']; It seems like its rendering the empty array and never getting to the actual data... app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.myData = []; $scope.loading = true; $scope.gridOptions = { enableSorting: true, columnDefs: [ { name: 'Id', field: 'PK_Inspection' }, { name: 'Employee Id', field:

How to filter displayed data in ui-grid by using angularjs?

十年热恋 提交于 2019-12-04 12:39:13
This is my code var app = angular.module('app', ['ui.grid']); app.controller('TableCrtl', ['$scope', '$filter', function ($scope, $filter) { var myDummyData = [{name: "Moroni",address:"one", age: 50}, {name: "Tiancum",address:"vij", age: 43}, {name: "Jacob",address:"dfr", age: 27}, {name: "Nephi",address:"mnc", age: 29}, {name: "Enos",address:"trr", age: 34}]; $scope.filterOptions = { filterText: '' }; $scope.gridOpts = { data: myDummyData, // enableFiltering: true, columnDefs: [ {name: 'Name', field: 'name', enableFiltering: true}, {name: 'Address', field: 'address', enableFiltering: true} ]

Angular.js ui-grid custom date filter

自古美人都是妖i 提交于 2019-12-04 11:30:48
问题 I am using the angular grid, ui-grid, located at ui-grid.info. I am trying to make a custom filter that will filter the grid by date using date inputs controls, one for less than and one for greater than. I seem to be able to put get the controls where i want them using this in the columnDefs: { field: 'mixedDate', cellFilter: 'date', filterHeaderTemplate: '<div>From <input type="date"> to <input type="date"></div>' } . I also can get some sort of filtering to work by setting the data-ng

How to Get Filtered data from paged ui-grid

陌路散爱 提交于 2019-12-04 09:55:16
问题 I'd like to get filtered data from a ui-grid when the paging feature is enabled. In general case I used $scope.gridApi.core.on.filterChanged($scope, function () { if ($scope.gridApi.grid.columns[1].filter.term != "" && $scope.gridApi.grid.columns[1].filter.term != undefined) { var dd =$scope.gridApi.core.getVisibleRows($scope.gridApi.grid); console.log(dd); }); but the code doesn't work well when the paging is enabled, it return only rows of the first page. but I need all the filtered data.