ng-grid

How to get the cell value from ng-grid

江枫思渺然 提交于 2019-11-30 21:09:25
I am a beginner of AngularJS. I study the demo of ng-grid and have a question. index.html <!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="utf-8" /> <title>AngularJS Plunker</title> <link rel="stylesheet" type="text/css" href="http://angular-ui.github.com/ng-grid/css/ng-grid.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> <script type="text/javascript" src="http://angular-ui.github.com

how to hide/show ng-grid column externally?

岁酱吖の 提交于 2019-11-30 20:40:25
I am using ng-grid where i want to hide/show columns on external button click . I tried this, but its not working $scope.gridOptions.$gridScope.columns[0].toggleVisible() Try using the ng-click directive your html button could look like this <input type="button" ng-click="toggleCol(0)" /> and your js like this var app = angular.module('myCoolGridApp', ['ngGrid']); app.controller('MyCtrl', function ($scope) { $scope.toggleCol= function(i) { $scope.gridOptions.$gridScope.columns[i].toggleVisible() } } 来源: https://stackoverflow.com/questions/18656034/how-to-hide-show-ng-grid-column-externally

Using an ng-option dropdown in a ui-grid editableCellTemplate [ng-grid 3.x]

荒凉一梦 提交于 2019-11-30 19:34:30
I'm using ng-grid's new 3.0 release ui-grid to make a grid in my application. What i'm trying to do is make one of the editable cells in my table an ng-options dropdown that is filled with data retrieved with an angular factory. I'm trying to do this by using the editableCellTemplate feature of the ui-grid. Here is some example code: HTML: <div ui-grid="gridOptions" ui-grid-edit class="grid"></div> Controller: $scope.gridOptions = { enableSorting: true, enableFiltering: true, enableCellEditOnFocus: true, columnDefs: [ { field: 'name', sort: { direction: 'desc', priority: 1 } }, { field:

How to render html formatted text in ng-grid column header

烂漫一生 提交于 2019-11-30 19:34:24
问题 I have 5 column names in a config file which I read into an array called columns in javascript. var columns = []; var columnNames = []; var columnCount = 5; $scope.nettingGridOptions = { data : 'tableData', columnDefs: 'columnNames' } Next, I just iterate through the columns array and assign values in columnNames array so that my ng-grid starts showing correct displayName . for(i=0;i<columnCount;i++) { columnNames[i] = { field: i, displayName: columns[i], headerClass : "myPersonalHeaderClass"

Ng-grid vs. ui-grid [closed]

大憨熊 提交于 2019-11-30 07:46:33
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . 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? 回答1: The github repo says that all development will happen on ui

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

▼魔方 西西 提交于 2019-11-30 07:18:30
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. As I commented, this is a known issue inside an ng-grid cell. I fixed this by setting cellClass in the column definition to this:

Angular ui grid how to show a loader

点点圈 提交于 2019-11-30 06:51:04
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 AardVark71 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 is: 1 ) Add the loading gif to your html ( for loading gif look here ) <div id="loadingWidget"

How to get ng-grid to hide certain rows

▼魔方 西西 提交于 2019-11-30 05:29:38
I have an array of objects that I want to show in ng-grid. Each row has a boolean property isVisible . In the ng-grid I want to show only the rows where isVisible is true. The other rows should be completely hidden. I have tried using a rowTemplate and databinding a ng-show to isVisible . That hides the content of the row, but leaves the actual row in place, showing an empty row. I have tried using filterOptions, but can't figure out the correct syntax to do such a filtering. I couldn't find any good documentation on how to set it. I have even tried modifying the gridTemplate in the ng-grid

Turnoff Scrolling within Angular UI ng-grid?

我的未来我决定 提交于 2019-11-30 05:04:01
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? Dharmesh I recently ran into same issues and found a solution at https://groups.google.com/forum/#!topic/angular/KiBXP3eKCDY You want ng-grid to initialize after you have data. The

how to hide/show ng-grid column externally?

99封情书 提交于 2019-11-30 04:53:36
问题 I am using ng-grid where i want to hide/show columns on external button click . I tried this, but its not working $scope.gridOptions.$gridScope.columns[0].toggleVisible() 回答1: Try using the ng-click directive your html button could look like this <input type="button" ng-click="toggleCol(0)" /> and your js like this var app = angular.module('myCoolGridApp', ['ngGrid']); app.controller('MyCtrl', function ($scope) { $scope.toggleCol= function(i) { $scope.gridOptions.$gridScope.columns[i]