angular-ui-grid

How to access entire row data in angular-ui-grid cellFilter

拟墨画扇 提交于 2019-12-22 09:09:09
问题 I would like to execute a cellFilter to programatically define what needs to be displayed within a cell. When defining the column definitions you need to specify what field the cell corresponds with, however I need access to the entire row of data within the cellFilter, not just a single field. Is it possible to pass multiple fields to a filter, or the entire row? { name: 'To', field: 'myData', cellFilter: 'formatCaller' } Thank you. 回答1: Yes, passing this as an argument to your filter sends

UI Grid CSS not working

馋奶兔 提交于 2019-12-22 08:10:10
问题 I tried to create a grid using UI grid (Recent version of ngGrid) which is unstable version and integrated in my current project. It is Not correctly displaying the (icon angle down and row selected icon) as needed While including the CSS file in project (by downloading the file and uploading) its giving me display errors as shown below. But, if i directly give the web url for CSS file in my project...it is displaying correctly. //web url: <link rel="stylesheet" href="http://ui-grid.info

Angular ui grid does not show content unless browser window is resized

徘徊边缘 提交于 2019-12-22 05:21:41
问题 I am using angularjs 1.5.0 with angular ui grid 3.1.1. When I assign gridOptions (passed to the grid directive) object in controller body like this: $scope.gridOptions = { data: [{"mock2": 1, "mock1": 2}, {"mock2": 10, "mock1": 22} ] }; HTML: <div ui-grid="gridOptions"></div> It displays the table as expected. But when I try to change data inside $scope.on: $scope.$on('update', function (event, passedFromBroadcast) { $scope.gridOptions.data= [{"mock2": "set", "mock1": "inside"}, {"mock2": "

Angular ui grid does not show content unless browser window is resized

给你一囗甜甜゛ 提交于 2019-12-22 05:21:11
问题 I am using angularjs 1.5.0 with angular ui grid 3.1.1. When I assign gridOptions (passed to the grid directive) object in controller body like this: $scope.gridOptions = { data: [{"mock2": 1, "mock1": 2}, {"mock2": 10, "mock1": 22} ] }; HTML: <div ui-grid="gridOptions"></div> It displays the table as expected. But when I try to change data inside $scope.on: $scope.$on('update', function (event, passedFromBroadcast) { $scope.gridOptions.data= [{"mock2": "set", "mock1": "inside"}, {"mock2": "

How do I add image in a angular ui-grid cell

青春壹個敷衍的年華 提交于 2019-12-21 16:51:14
问题 How do I add image in a angular ui-grid cell. var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.gridOptions = { enableSorting: true, columnDefs: [ { field: 'name' }, { field: 'company' }, { field: 'image'} ], data:[ {name:"Name1",company:"Company1",image:"http://cdn.flaticon.com/png/256/70689.png"}, {name:"Name2",company:"Company2",image:"http://cdn.flaticon.com/png/256/70689.png"},] }; }]);

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

Angular JS UI-Grid Delete Row

天涯浪子 提交于 2019-12-20 12:17:06
问题 I'm new to ui-grid and I'm trying to implement a table in AngularJS as shown in the picture below. I'm trying to select a row and delete it using a delete button on that particular row. The ui-grid documentation requires us to use the gridApi but I can't find sufficient documentation for the same. 回答1: Please see a working example of how to delete a row here. http://plnkr.co/edit/6TiFC6plEMJMD4U6QmyS?p=preview The key is to use indexOf(row.entity) and not relying on row.index as it doesn't

Action Button in Angular UI Grid 3.x version

不打扰是莪最后的温柔 提交于 2019-12-20 11:23:45
问题 I am trying to render a simple table using Angular UI Grid (unstable version). Against each row I need a button when clicked should be handled in my parent controller. Plunker Javascript:- angular.module("app", ['ui.grid', 'ui.grid.edit', 'ui.grid.selection', 'ui.grid.pagination', 'ui.grid.expandable', 'ui.grid.paging']).controller("appController", function($scope) { console.log("Controller is up."); $scope.data = []; for (var i = 0; i < 50; i++) { $scope.data.push({ fullName: "Name" + i, age

Using ui-grid constants to disable scrollbars

一曲冷凌霜 提交于 2019-12-20 09:49:04
问题 With the latest version of ui-grid (v3.0.0-rc.16) it is possible to turn the horizontal and vertical scrollbar off seperately. I got this working by exchanging $scope.gridOptions.enableScrollbars = false; with $scope.gridOptions.enableHorizontalScrollbar = 0; $scope.gridOptions.enableVerticalScrollbar = 0; In the sources of ui-grid there are three Constants defined for the scrollbars: scrollbars: { NEVER: 0, ALWAYS: 1, WHEN_NEEDED: 2 } Facing the fact that ui-grid is still unstable and

ag-grid vs slick-grid vs angular-grid which is better? [closed]

雨燕双飞 提交于 2019-12-20 08:34:27
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Recently we thought to change our current grid tool. Currently we're using kendo-ui for grid and all. After searching we came with 3 results. But, still we're not sure which is better and why in future run. While using kendo we missed having control over it. It would be a