ng-grid

ngGrid Multi Column Filtering

99封情书 提交于 2019-11-30 04:49:32
I am using the ngGrid module for AngularJS to show some paged data. I want to be able to search across multiple columns, however using an OR search. Lets say I have a column with the following headings: Id, Name, Description. When I search I want to return all rows where either Id OR name OR description contain the search term. $scope.pagingOptions = { pageSizes: [20, 50, 100], pageSize: 20, totalServerItems: 0, currentPage: 1 }; $scope.gridOptions = { data: 'myData', columnDefs: [ { field: 'id', displayName: 'Id' }, { field: 'name', displayName: 'Name' }, { field: 'description', displayName:

Error: [ngModel:nonassign] Expression is non-assignable

徘徊边缘 提交于 2019-11-30 00:33:47
问题 Trying to display a columnvalue from a gridcollection based on another value in that same row. The user can select/change values in a modal which contains a grid with values. When the modal closes the values are passed back. At that moment I would like to set a value for 'Also known as': html: Also known as: <input type="text" `ng-model="displayValue(displayNameData[0].show,displayNameData[0].value)">` I created a function on scope to select the value only when the 'show' value is true:

How to filter my data? (ng-grid)

為{幸葍}努か 提交于 2019-11-29 21:06:56
I think this is most likely very simple but I cannot find any clear documentation on how to add a filter outside of the 'filterText' that is shown on their website. What I am trying to do is something as simple as this: $scope.filterOptions = { filter: $scope.myFilter, // <- How to do something like this? useExternalFilter: true } $scope.gridOptions = { data: 'entries', enableColumnResize: false, multiSelect: false, enableSorting: false, selectedItems: $scope.selectedEntries, filterOptions: $scope.filterOptions } $scope.lowerLimit = 50; // My Filter $scope.myFilter = function(entry) { if

Angular-ui's tooltip does not display correctly in ng-grid

时光怂恿深爱的人放手 提交于 2019-11-29 09:23:08
问题 I've been searching for some time for a solution for displaying a tooltip on ng-grid but with no luck. When I use the cellTemplate on ng-grid for customizing the cell to include a tooltip I have experienced various problems - the tooltip is either not showing up or behaving strangely as shown in a plunker: http://plnkr.co/edit/MFhwgOvSUFKcyJPse5wf. Have I missed something? Does anyone have a solution for displaying tooltips nicely in ng-grid? Best regards. 回答1: As I commented, this is a known

Angular ui grid how to show a loader

时光怂恿深爱的人放手 提交于 2019-11-29 08:37:06
问题 I'm wondering how to show a simple loader before data was loaded. I'm using ng-grid-1.3.2 I'm googling but I didn't find any example. Bye 回答1: like Maxim Shoustin suggested you can use the angularjs-spinner from Jim Lavin which uses ( deprecated ) Response Interceptors. I think it's explained best here : http://codingsmackdown.tv/blog/2013/04/20/using-response-interceptors-to-show-and-hide-a-loading-widget-redux/ In a nutshell, in his first solution, what you have to do for your ng-grid app

paste into ngGrid from excel

…衆ロ難τιáo~ 提交于 2019-11-29 07:58:19
Folks, Does anyone know how to make the ng-grid work with excel i.e provide the ability to copy-paste from excel into the grid ? I know of the enableCellEdit: true attribute but that don't make the grid work with excel. HandsonTable http://handsontable.com/ is really awesome for this. The author is working on an angular directive on github: https://github.com/warpech/angular-ui-handsontable They now claim on their homepage that they charge money. They do have an open source version (it started as open source). Checkout their MIT license on github. 来源: https://stackoverflow.com/questions

AngularJS/ng-grid - Updating array with splice doesn't updates UI

僤鯓⒐⒋嵵緔 提交于 2019-11-29 07:10:59
I am trying to update ng-grid with array splice . I have a plunk here . Add button adds new row. Update button updates last item in the array. Select a row & press update button. Nothing happens. Press add button. Now UI gets updated with new element & as well as the previously updated element. Same behavior gets repeated again & again. I tried $scope.$apply . I get: “Error: $apply already in progress” I even tried by placing $scope.$apply block inside a setTimeout call. Again the same error! Any pointers! Thanks! That's because data $watcher in ng-grid (incorrectly) compares the data object

Ng-grid vs. ui-grid [closed]

我的梦境 提交于 2019-11-29 05:26:49
I looked at the angular-ui modules because I need to implement a grid. I saw that there is the stable ng-grid and the unstable version ui-grid. Which version should I use? Are they very different or hard to switch? The github repo says that all development will happen on ui-grid (ng-grid 3). That means ng-grid has become a legacy grid. ui-grid is stable enough to use in my opinion and the only reason to use ng-grid is if you already started with it. New projects would be better off using ui-grid. They also claim that the performance of ui-grid is better than that of ng-grid though I haven't

Turnoff Scrolling within Angular UI ng-grid?

柔情痞子 提交于 2019-11-29 02:52:19
问题 We would like to use the Angular UI ng-grid, but can't seem to find an option to tell the viewport within the grid to not set the overflow to auto and not scroll. What we'd like to do is have the table/grid height be dynamic based off the size of the number of rows in our grid. We have a fixed max number of rows so there is little concern with having too many rows in the DOM. Any suggestions on where to go? 回答1: I recently ran into same issues and found a solution at https://groups.google.com

ngGrid Multi Column Filtering

若如初见. 提交于 2019-11-29 02:17:56
问题 I am using the ngGrid module for AngularJS to show some paged data. I want to be able to search across multiple columns, however using an OR search. Lets say I have a column with the following headings: Id, Name, Description. When I search I want to return all rows where either Id OR name OR description contain the search term. $scope.pagingOptions = { pageSizes: [20, 50, 100], pageSize: 20, totalServerItems: 0, currentPage: 1 }; $scope.gridOptions = { data: 'myData', columnDefs: [ { field: