angular-ui-grid

Button click does not work in Celltemplate angular grid

旧时模样 提交于 2019-12-02 03:16:07
I m trying to work with celltemplate. But click event did not work. $scope.format = function(val){ return val.replace(/\//g, ""); }; var executionColumns = { data: [], enableSorting: true, paginationPageSizes: [25, 50, 75], paginationPageSize: 25, enableColumnMenu: true, enableFiltering: true, columnDefs: [ { field: 'StartDate', cellTemplate: '<button ng-click="format (row.entity)">log</button>' }, { field: 'Status' }, ] }; So what should I do? What is the wrong? It works for me like the 2nd code columnDefs: [ { field: 'StartDate', cellTemplate: '<button ng-click="format(grid.getCellVale(row

Copy angular-ui-grid fonts into .tmp/fonts

雨燕双飞 提交于 2019-12-01 20:12:30
I was experiencing a known issue with Angular UI Grid where some of my fonts would look Korean in production. I applied a certain fix by adding the following CSS: @font-face { font-family: 'ui-grid'; src: url('../fonts/ui-grid.eot'); src: url('../fonts/ui-grid.eot#iefix') format('embedded-opentype'), url('../fonts/ui-grid.woff') format('woff'), url('../fonts/ui-grid.ttf?') format('truetype'), url('../fonts/ui-grid.svg?#ui-grid') format('svg'); font-weight: normal; font-style: normal; } This fixed the problem in production, but now in development I get these errors in the browser console: GET

not show active tab title correctly in AngularStrap tab

狂风中的少年 提交于 2019-12-01 14:01:42
I have four tabs using the latest AngularStrap tab, every tab has a close button, and every tab pane using the latest ui-grid . expected result: close the second tab, then show the third active tab, which can show the third tab title and tab pane correctly. but the actual result is: close the second tab, then show the third tab pane correctly, the third active tab title can't show correctly, it show the fourth active tab title. html code: <div data-fade="1" bs-active-pane="tabs.activeTab" bs-tabs> <div ng-repeat="tab in tabs" data-title="{{ tab.title }}" name="{{ tab.title }}" disabled="{{ tab

not show active tab title correctly in AngularStrap tab

心不动则不痛 提交于 2019-12-01 12:30:01
问题 I have four tabs using the latest AngularStrap tab, every tab has a close button, and every tab pane using the latest ui-grid . expected result: close the second tab, then show the third active tab, which can show the third tab title and tab pane correctly. but the actual result is: close the second tab, then show the third tab pane correctly, the third active tab title can't show correctly, it show the fourth active tab title. html code: <div data-fade="1" bs-active-pane="tabs.activeTab" bs

UI-Grid with button in custom cell template - How to cancel row select event?

女生的网名这么多〃 提交于 2019-12-01 09:30:37
I am using ui-Grid v 3.0.1. I have a custom cell template for a particular column which displays a button in each row. I have attached a ng-click attribute which calls the appScope to trigger some action. All works beautifully. However, the clicking of the custom template button also causes the selection of the row in question to be toggled. I need to prevent this from happening. i.e. a click to the custom template button should leave the current row's selection status as it was. I suspect I need to cancel the row selection event somehow. Can anyone point me in the right direction? vm

How do I get data to show up in angular ui.grid from an $http request

别来无恙 提交于 2019-12-01 09:25:15
I am using Typescript and AngularJS. I have a template that contains a ui.grid directive. The grid is displayed and at some later time an $http request gets the data I want the grid to contain. I tried setting the gridOptions.data to an array and in the success function of the $http call I set the array used for gridOptions.data to the returned data. The grid shows nothing. Any ideas? I'm going to mark Roman's answer correct, but since I specified I was using Typescript I'll show my solution for completeness: export class MyController { constructor ( ) { //...code to setup grid, col defs, data

How do I get data to show up in angular ui.grid from an $http request

你。 提交于 2019-12-01 06:53:37
问题 I am using Typescript and AngularJS. I have a template that contains a ui.grid directive. The grid is displayed and at some later time an $http request gets the data I want the grid to contain. I tried setting the gridOptions.data to an array and in the success function of the $http call I set the array used for gridOptions.data to the returned data. The grid shows nothing. Any ideas? I'm going to mark Roman's answer correct, but since I specified I was using Typescript I'll show my solution

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

荒凉一梦 提交于 2019-11-30 19:34:30
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, enableCellEditOnFocus: true, columnDefs: [ { field: 'name', sort: { direction: 'desc', priority: 1 } }, { field:

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

此生再无相见时 提交于 2019-11-30 11:07:18
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 hard-coded data but my eventual goal would be to have the pre-population be comprised of the unique data

Format a ui-grid grid column as currency (RC 3.0)

故事扮演 提交于 2019-11-30 08:40:26
The grid options below display the data as expected. But If I try to to format the row.entity[col.field] value in my cellTemplate, I don't get any data returned. Code: $scope.gridOptions = { enableSorting: true, columnDefs: [ {name: 'Award Title', field: 'projectTitle', minWidth: 100 }, {name: 'Amount', field: 'awardAmount', cellTemplate: '<div>{{Number(row.entity[col.field]).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')}} ] }; Any guidance on how to format the column as currency is appreciated. Thanks. You can use 'currency' cellFilter to format your data. $scope.gridOptions = {