ui-grid

How can I merge columns in UI-grid?

☆樱花仙子☆ 提交于 2019-12-12 02:25:37
问题 Is there any way to merge the columns of UI-grid to be appear as continuous row (without any column line in between). I have tried this merge columns in ui grid but this causes me loss of row data at row number number 1. Even more I want every alternate row to be merged. Here is my Html <div id="grid" ui-grid="gridOptions" ui-grid-move-columns ui-grid-resize-columns ui-grid-auto-resize class="grid"></div> Here is my js code for grid $scope.gridOptions = { enableColumnResizing: true,

How to dynamically adjust height in Angular ui-grid Treeview?

荒凉一梦 提交于 2019-12-11 17:05:33
问题 I was looking at the following example of treeview using Angular 1.5: link In the css section it specifies a fixed height for .grid as follows: .grid { width: 500px; height: 500px; } Is there a way of dynamically adjusting this height according to how a tree node is clicked to expand? The relevant documentation for treeview is here. However, the example shown there also has a fixed height, which I would like to change to dynamic height. 回答1: I managed to find a solution by implementing

How to call a function multiple times from cell template in ui-grid in angularjs?

喜你入骨 提交于 2019-12-11 15:52:24
问题 I have one controller in angularJs(1.6) which is using ui-grid. Problem is there is one cell template. I want to get different values for rating percentage in this template. I have created a function "getRating()" and called it. But it gets called only one time. Hence I get the same value for all the template. Could anyone please help me with this? Here is my controller code: (function () { 'use strict'; define([ 'angular' ], function (angular) { function SelectToolController($scope, $timeout

Is it possible to bind the sorting of a column to a different property than its display property with Angular UI Grid?

南笙酒味 提交于 2019-12-11 11:10:19
问题 I was just wondering if anyone knew of a way to sort a column in the same order as another column using Angular UI Grid. 回答1: I'm guessing you mean that if (for example) you have "First Name" and "Last Name" columns which display first name and last name respectively, you want to click sort on "Last Name" and this actually sorts the table in order of "First Name"? If so, you can accomplish this using a cell template. Assume you have the following table: and when you sort the "Last Name"

AngularJS: How to export ui-grid data to excel?

痞子三分冷 提交于 2019-12-11 03:52:29
问题 i'm new in angularJS and i want to export my ui-grid data to excel file, with each value in each cell. It is possible? How? any examples? Thanks in advance. 回答1: I can achive this using js-xlsx and FileSaver http://plnkr.co/edit/DVhIUgGD04yDXtjp7ReW This code block is exporter service. (function () { 'use strict'; angular .module('app.utils') .factory('exportUiGridService', exportUiGridService); /* @ngInject */ function exportUiGridService(uiGridExporterService) { var service = {

How to refresh UI-Grid layout after reloading data

喜欢而已 提交于 2019-12-10 17:38:52
问题 I have a problem with Angular UI-Grid (http://ui-grid.info/). Grid is implemented in modal window that appears after user clicks button. Service works that way: User selects data set to prepare and clicks button. After clicking button website sends request to rest service to receive data. After receiving data modal with table is shown. Columns count depends on data requested by user. The problem is that after user changes columns width and close modal with this table UI-Grid 'remembers' this

ui-grid custom directive height not getting updated when i change the data

我的未来我决定 提交于 2019-12-08 11:33:42
问题 I have a UI-grid Custom Directive and I am changing the height of grid with a condition that if it has more than 10 rows I am fixing the height, this is the following code scope.gridOptions.data = scope.data; if (scope.data.length > 10) { scope.gridOptions.minRowsToShow = 10; } else { scope.gridOptions.minRowsToShow = scope.data.length; } scope.gridOptions.virtualizationThreshold =scope.gridOptions.minRowsToShow; by default its working fine but when I change the data the height is not

angular js ui-grid double click on row not working

∥☆過路亽.° 提交于 2019-12-07 22:32:29
问题 I want to call a function myFunc on doubleclick of ui-grid row. for that I have used <ng-dblclick="grid.appScope.myFunc()"> but it is not being called and showing no error. here is the calling part of html : <div ui-grid="gridOptions" ui-grid-selection class="gridStyle" ng-dblclick="grid.appScope.myFunc()"> </div> and here is the js script: var myData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; var app

angular js ui-grid double click on row not working

限于喜欢 提交于 2019-12-06 05:10:13
I want to call a function myFunc on doubleclick of ui-grid row. for that I have used <ng-dblclick="grid.appScope.myFunc()"> but it is not being called and showing no error. here is the calling part of html : <div ui-grid="gridOptions" ui-grid-selection class="gridStyle" ng-dblclick="grid.appScope.myFunc()"> </div> and here is the js script: var myData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; var app = angular.module('myApp', ['ui.grid', 'ui.grid.selection']); app.controller('MainCtrl', function(

Angular UI Grid Scroll Error

时光毁灭记忆、已成空白 提交于 2019-12-03 05:27:26
I am using ui grid 3.0.6. Until yesterday it was working fine. But there is a problem in Google chrome now.(Version 56.0.2924.87) When I scroll the grid, or click on scroll down arrow it starts scrolling very fast. Couldn't control the speed. It was working fine and only in Chrome. Can anyone help? Thanks in advance. Adding this style to my style.css is helped .ui-grid-viewport { overflow-anchor: none; } It's may be related to "Scroll Anchoring" feature, that has been enabled by default in Chrome 56. description of feature css-property "overflow-anchor: none", should solve this problem. 来源: