angular-ui-grid

Can't get ui-grid to work in bootbox custom dialog

可紊 提交于 2019-12-24 13:37:21
问题 I'm using AngularJS, UI-Grid (http://ui-grid.info/), and Bootbox for a project. What I'd like to do is have the user click a button on the screen, and bring up a dialog box where they select an item from a UI-Grid table. I put together the simplest example I could make: http://plnkr.co/edit/YvsiAQhUrNqnSse1O0oh?p=preview In this, I generate the dialog box HTML like this: var tplCrop = '<div ng-controller="MyTableDialogCtrl">{{ someText }}' + '<div ui-grid="gridOptions" ui-grid-pagination

Set cell value based on a condition

为君一笑 提交于 2019-12-24 12:43:39
问题 I have a column binded to a field called state , which has the values: S or L . I want to map this to following: S => Short , L => Long This is how the binding is defined: $scope.gridOptions = { enableSorting: true, enableFiltering: true, enableHorizontalScrollbar: 0, columnDefs: [ {name: 'action', field: 'state', width: 110, enableFiltering: false} ] }; I am already using cellclass and celltemplating , but either one is used for class application or event binding respectively. How do I set

Angular UI Grid - Custom Header Template and Filtering

我是研究僧i 提交于 2019-12-24 11:54:17
问题 I'm looking for a good example of having a basic filter and having a custom template. I'm having trouble finding a good example on the tutorial sites. See attached plunk where I'm setting filtering and having a custom header template. Does the filtering need to be embedded into the header template? http://plnkr.co/edit/VMETPu30iiFc3GYmZZRS?p=preview var app = angular.module('app', ['ngAnimate', 'ui.grid']); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope

ui-grid using external Pagination and exporting data

旧城冷巷雨未停 提交于 2019-12-24 04:47:15
问题 I am currently using ui-grid implemented with external pagination to display my data. I've run into as issue where I can only export the currently viewed data, however I need to be able to export ALL data as well. Anyone know a work around to export all data using external pagination? 回答1: I ended up using csvExport function included with ui-grid. I added an "Export All" custom menu item and it works great! Here is my code: gridMenuCustomItems: [ { title: 'Export All', action: function (

UI-GRID column summation on checkbox change

℡╲_俬逩灬. 提交于 2019-12-23 22:33:34
问题 Does anyone know why when I click on different radio values multiple times, my Dynamic Total value changes drastically? The code below should automatically select the column of checkboxes according to the radio buttons. Not sure why there would be miscalculations. switch($scope.ChangeAll.name) { case 'x': row.xBox = true; row.yBox = false; row.zBox = false; break; case 'y': row.xBox = false; row.yBox = true; row.zBox = false; break; case 'z': row.xBox = false; row.yBox = false; row.zBox =

How to update sort-indicators in ui-grid programmatically?

你离开我真会死。 提交于 2019-12-23 20:02:58
问题 I am using ui-grid - v3.0.0-rc.22 - 2015-06-15. It is configured to use external sorting, which works fine. Now i have the requirement to change the sorted column from outside with a select box. On every change of the select box it fires external sorting and the data in the grid is updated correctly. It also updates the gridOptions.columnDefs: It sets the sort object of all columns except the correct one to undefined and updates the sorted column. But there is one problem, the current sorted

UI-GRID Expandable Grid. Programatically expand one row

只谈情不闲聊 提交于 2019-12-23 17:12:17
问题 I want to hide the + icon in the far left column and add another icon. When the user clicks the new Icon I want to programatically expand that specific row. I see there is gridApi.expandable.expandAllRows(); Is there a way to expand just one row? 回答1: If all you want is to change the default plus icon to a different icon, you can simply override the template for the expandableRowHeader. $templateCache.put('ui-grid/expandableRowHeader', "<div class=\"ui-grid-row-header-cell ui-grid-expandable

How to get angular ui grid footerTemplate to work?

扶醉桌前 提交于 2019-12-23 09:00:06
问题 Angular UI-Grid has a property called footerTemplate, which is supposed to offer the possibility to create a custom footer template. I tried entering html content (a div with some text) in a string, I've also tried adding a .html file name in the string and even the ID of a rendered div, but none of them seem to work. It also wasn't clear for me if I need to enable showGridFooter for this or not, so I tried both, but the footerTemplate is either not shown at all, or if I set showGridFooter to

Angularjs ui-grid row not resizing according to content

此生再无相见时 提交于 2019-12-23 04:33:50
问题 I have a ui-grid(v3.0.0-rc.20-8199eb5) cellTemplate which iterates over an array and prints out the names in the column. {name:'roles', cellTemplate: '<div ng-repeat="role in row.entity.roles>{{role.name}}</div>'} The row height is not big enough for the content and cuts it off. Row height will differ per entry depending on the amount of roles for the entry. Is there a way for the entire row to auto expand/resize according to the content in the row? 回答1: The solution that worked for me in the

How to Redraw Tables using Angular UI Tabs and UI Grid?

血红的双手。 提交于 2019-12-22 14:02:28
问题 I'm trying to migrate from jQuery Data Tables to Angular UI. My app uses the MySQL World schema and displays the data in 3 different tables. In jQuery, I'd 3 different pages, each launched from a home page. Here's a live example. In Angular, I created 3 tabs, clicking on each of which is supposed to reload the page with a new grid and populate it with data. Problem is, the grid gets displayed alright on page load with the content on the first tab. On clicking the other tabs, page goes empty