ng-grid

Dynamically Change the Grid Options in angular ui.grid

雨燕双飞 提交于 2019-12-21 02:53:09
问题 I have to show two types of gridOptions without using two grid's trying to change the gridOptions dynamically not working(one time working). working example http://plnkr.co/edit/4QKGIB?p=preview. $scope.grid1=function(){ $scope.gridOptions = $scope.gridOptions1; $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL); } $scope.grid2=function(){ $scope.gridOptions = $scope.gridOptions2; $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL); } 回答1: Basically you need

Default headerCell Template in ng-grid

纵然是瞬间 提交于 2019-12-20 05:40:11
问题 Consider the following snippet of angularJs code: var myHeaderCellTemplate = '<div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{\'cursor\': col.cursor}" ng-class="{ \'ngSorted\': !noSortVisible }">' + '<div ng-click="col.sort($event)" ng-class="\'colt\' + col.index" class="ngHeaderText">{{col.displayName}} <img src="PLUS-ICON.png" /></div>' + '<div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div>' + '<div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"><

How to dynamically configure ng-grid

穿精又带淫゛_ 提交于 2019-12-19 05:18:39
问题 I have a view in an angularjs application in which I want to allow the user to select between various differently configured grids. Ideally I would like to bind the value passed to the ng-grid directive to a model variable, as illustrated below. However, although this example renders markup that works when a simple string value is passed to ng-grid (ie. <div class="gridStyle" ng-grid="gridOptions1"></div> , dynamic configuration fails. var app = angular.module('myApp', ['ngGrid']); app

How to dynamically configure ng-grid

泪湿孤枕 提交于 2019-12-19 05:18:18
问题 I have a view in an angularjs application in which I want to allow the user to select between various differently configured grids. Ideally I would like to bind the value passed to the ng-grid directive to a model variable, as illustrated below. However, although this example renders markup that works when a simple string value is passed to ng-grid (ie. <div class="gridStyle" ng-grid="gridOptions1"></div> , dynamic configuration fails. var app = angular.module('myApp', ['ngGrid']); app

How to get the cell value from ng-grid

拥有回忆 提交于 2019-12-19 03:22:40
问题 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

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

杀马特。学长 韩版系。学妹 提交于 2019-12-19 01:25:44
问题 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,

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

Deadly 提交于 2019-12-19 01:25:29
问题 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,

How to change height of ui-grid row?

隐身守侯 提交于 2019-12-18 14:03:16
问题 I am using ui-grid. I have a lot of rows and that is why I use scrolling. Everything works perfectly ok until I try to change the height of the rows. Then the scrolling becomes a mess. I have added an example here http://plnkr.co/edit/S6ylwOVgcQp7CSsZZxpR?p=preview This is one of the tutorials from the ui-grid website - the only thing I have changed is the CSS. I have added these rules. .ui-grid-cell-contents { padding: 1px 1px; } .ui-grid-render-container-body .ui-grid-header-cell, .ui-grid

How to get ng-grid to hide certain rows

杀马特。学长 韩版系。学妹 提交于 2019-12-18 12:08:32
问题 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

How to filter my data? (ng-grid)

不想你离开。 提交于 2019-12-18 10:22:08
问题 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: