angular-ui-grid

How to filter with multiple values in ui-grid? (angularjs)

天涯浪子 提交于 2019-12-11 09:53:31
问题 I'm trying to make a filter with passing multiple values for the filter but have only a single return. field: 'name', filter: { condition: function(searchTerm, cellValue) { var strippedValue = (searchTerm).split(';'); //console.log(strippedValue); for (i = 0; i < strippedValue.length; i++){ if (cellValue.indexOf(strippedValue[i]) == -1) return false; return true; } //return cellValue.indexOf(strippedValue) >= 0; } }, headerCellClass: $scope.highlightFilteredHeader find the test code here http

How to catch applied column filter in angular ui-grid

让人想犯罪 __ 提交于 2019-12-11 05:56:34
问题 I'm working with ui-grid and server-side filtering. For each column I send a request to API with param based on filter value. By default param is empty var filterOptions = { filterBy: '&$filter=', filterParam: "" }; // and api call looks like ?$orderby=id-&pageSize=250&pageNbr=1&$filter= if I setup any filter I send next request param: filterOptions.filterParam = 'eventTypeId==' + evtTypeId request: ?$orderby=id-&pageSize=250&pageNbr=1&$filter=eventTypeId==2 So what I want is pretty simple

while Exporting to PDF, column content is exceeding the column border in uigrid angularjs

隐身守侯 提交于 2019-12-11 04:43:17
问题 if i get the column data like this with no space in between $scope.gridOptions.data = [{"name":"rasheedsyedabdulhameed"}]; and this is my gridoptions $scope.gridOptions = { columnDefs: [ { field: 'name' }, { field: 'name' }, { field: 'name' } ], enableGridMenu: true, enableSelectAll: true, exporterCsvFilename: 'myFile.csv', exporterPdfDefaultStyle: {fontSize: 9}, exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color:

ngGrid injection into ng-app failed

人盡茶涼 提交于 2019-12-11 03:36:58
问题 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:modulerr] Failed to instantiate module ngGrid due to: Error: [$injector:nomod] Module 'ngGrid' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. Above is the error message I received. I have loaded the ng-grid script AFTER angularjs, jquery. I injected it into app like this: var

Angular ui.grid infinite scroll is not being called second time onwords

笑着哭i 提交于 2019-12-11 01:17:43
问题 My infinite scroll is not working 2nd time onward. I mean it loads the data first time while scrolling, after loading it also append the data to my data set but again if I scroll then it does not calling my load method. Attached Plunker here. Removed $http code with $timeout to reproduce problem on plunker. $timeout also same problem persist. var app = angular.module('plunker', ['ui.grid', 'ui.grid.infiniteScroll']); angular.module('plunker').controller('ListController',ListController);

detect cell edit in angular ui-grid

别说谁变了你拦得住时间么 提交于 2019-12-10 22:03:54
问题 I try to detect cell edit but the following code does not get event. I use "name": "angular-ui-grid", "version": "3.0.0-rc.14", Do I have to define some configuration to get events? $scope.$on('ngGridEventEndCellEdit', function(data) { 回答1: I updated the default row template to look like below rowTemplate: '<div ng-class="{\'row-changed\':row.entity.State==\'changed\'}" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid

angular ui-grid filter when user presses enter key

余生长醉 提交于 2019-12-10 19:26:39
问题 I have implemented a ui-grid with server side filtering, sorting and pagination. I use gridApi.core.on.filterChanged to detect filter change alongside $timeout to wait for user to finish typing. It's not bad idea to use $timeout , but I want to filter grid only on enter key, but filterChanged event watches the value of field and I think it doesn't have access to keypress nor keydown events to detect enter key. How can I call ajax filter on enter key? 回答1: Solution found! As I told before, I

uiGrid switch rows and columns

霸气de小男生 提交于 2019-12-10 18:28:11
问题 This is a bit of a general question into the possibilities of ui grid. I have had tremendous success with ui grid thus far. Now I have a use case where I want to switch the rows and columns of the grid. Basically, I would like the headers to be displayed 'vertically' in the first column and to have the rows become columns. Is this possible with ui grid? 回答1: As far as i know UI-grid doesn't support this. I doubt if you can do that. May be try building ColumnsDef and Data dynamically and pass

How to refresh UI-Grid layout after reloading data

喜欢而已 提交于 2019-12-10 17:38:52
问题 I have a problem with Angular UI-Grid (http://ui-grid.info/). Grid is implemented in modal window that appears after user clicks button. Service works that way: User selects data set to prepare and clicks button. After clicking button website sends request to rest service to receive data. After receiving data modal with table is shown. Columns count depends on data requested by user. The problem is that after user changes columns width and close modal with this table UI-Grid 'remembers' this

AngularJS : ui grid show multi lines in a cell

让人想犯罪 __ 提交于 2019-12-10 16:43:22
问题 i am trying to display multiple phone numbers in one cell . I want to display each number in a new line . I have tried multiple ways but I am unable to figure out. can anyone help with this . below is the link to my plnkr . http://plnkr.co/edit/LXdiDqoOAYQoO5BW02WR?p=preview .filter('phoneListFilter', function () { return function (telePhoneList) { var telePhoneArray = []; for (var i in telePhoneList) { telePhoneArray.push(telePhoneList[i]); } return telePhoneArray.join('<br>'); }; }) 回答1: