angular-ui-grid

Angular UI Grid click row

感情迁移 提交于 2019-11-30 08:28:06
I have a list of items in an Angular UI Grid . When I click a row, I want to be taken to a different page. (In other words, each row in the grid will be a link.) I imagine this must be a very common desire, although I haven't really seen any documentation on how to do it. What's a good way to accomplish this? I figured out the answer myself. Here's my controller (ES6): 'use strict'; class TrackingRecordsCtrl { constructor($scope) { // The content of this template is included // separately $scope.gridOptions = { rowTemplate: 'app/components/tracking-record/grid-row.html', }; // This function is

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

How to color row on specific value in angular-ui-grid?

瘦欲@ 提交于 2019-11-30 06:31:17
问题 I'm trying to color a row depending on it's value in the new angular-ui-grid 3.0 rc12 but I haven't been able to. The following code used to work in the previous version (ngGrid): $scope.gridOptions = data: 'data.sites' tabIndex: -1 enableSorting: true noTabInterference: true enableColumnResizing: true enableCellSelection: true columnDefs: [ {field: 'sv_name', displayName: 'Nombre'} {field: 'sv_code', displayName: 'Placa'} {field: 'count', displayName: 'Cuenta'} ] rowTemplate: """<div ng

ui grid save updated cell data to database

此生再无相见时 提交于 2019-11-30 04:30:16
I am working on ui grid edit cell feature. I need to update the edited cell value to the database using rest api. Also how can i get the list of rows selected in controller. My working code var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit']); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.gridOptions = { }; $scope.gridOptions.columnDefs = [ { name: 'id', enableCellEdit: false}, { name: 'name' }, { name: 'age', displayName: 'Age' , type: 'number', width: '10%' } ]; $http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500

Angular UI Grid: How to create a pre-populated dropdown menu for column filtering

假如想象 提交于 2019-11-29 16:42:43
问题 I am looking for some help regarding a feature of the Angular UI Grid . Specifically I am exploring filtering and while I was able to successfully implement sorting using free form text field(s) in my application as they do in the example on their site I would like some help finding a way to instead sort using a pre-populated drop-down menu for certain columns . To clarify: By pre-populated I mean I would like the drop-down to be populated through my code. I am ok if the solution contains

I want to write a custom directive for ui-grid with different input columnDefs

北慕城南 提交于 2019-11-29 08:57:01
This is my Controller $scope.usersList = {}; $scope.usersList = { paginationPageSizes: [10,15, 20], paginationPageSize: 10, columnDefs: [ { name: 'userId', cellTemplate: '<div class="ui-grid-cell-contents"><a ui-sref="appSetting.userSelected({userId: row.entity.userId})">{{ row.entity.userId }}</a></div>' }, { name: 'firstName' }, { name: 'lastName' }, { name: 'emailId' }, { name: 'action', cellTemplate: '<div>' + ' <button ng-click="grid.appScope.sampledetails()">Delete</button>' + '</div>', enableSorting: false, enableColumnMenu: false } ] }; and this is my .cshtml <div id="grid1" ui-grid=

Angular ui-grid events in cell header not firing

依然范特西╮ 提交于 2019-11-29 06:11:30
I'm using a headerCellTemplate in the columDefs of my ui-grid (not ng-grid but the new rewrite). In the html I have a checkbox. Essentially I am trying to add a checkbox in the header of a column that is all checkboxes so I can check all/none. The cell renders fine with the checkbox. The problem is that the ng-change in the checkbox in the header never fires the event. Additionally the ng-model value never changes. Looking at the code there is a directive used called uiGridHeaderCell so I have to assume that it is gobbling up my event as well as being in its own scope so it never sets the

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

ui-grid symbols issue

对着背影说爱祢 提交于 2019-11-29 05:25:23
I am using AngularJs ui-grid http://ui-grid.info/ . While implementing, I get something which you can see in the following img in right corner of the cell instead of dropdown symbols. Which files to include to solve this bug? You need to download the font files: ui-grid.woff ui-grid.eot ui-grid.svg ui-grid.ttf from here . And move them where your ui-grid.min.css lives. Please include ui-grid CSS file by this way <link rel="stylesheet" href="/release/ui-grid-unstable.css"> and ommit the script tag from the Authors Tutorial or Api <script src="/release/ui-grid-unstable.css"></script> for eg (

ui grid save updated cell data to database

我怕爱的太早我们不能终老 提交于 2019-11-29 01:13:39
问题 I am working on ui grid edit cell feature. I need to update the edited cell value to the database using rest api. Also how can i get the list of rows selected in controller. My working code var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit']); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.gridOptions = { }; $scope.gridOptions.columnDefs = [ { name: 'id', enableCellEdit: false}, { name: 'name' }, { name: 'age', displayName: 'Age' , type: