ag-grid

Cannot call setRowData unless using normal row model error in ag-grid

笑着哭i 提交于 2019-12-11 01:50:18
问题 Having a form with an ag-grid , even though basic grid is working it gives error in console cannot call setRowData unless using normal row model So most of the api functions including clear not working. <form [formGroup]="myForm" (ngSubmit)="search()" > <button type="submit" class="btn btn-primary ripple">Search</button> </form> <div class="grid-wrapper animated fadeIn" > <ag-grid-angular #agGrid style="width: 100%; height: 315px;" class="ag-fresh" [gridOptions]="gridOptions" [columnDefs]=

Row formatting in ag-Grid

一笑奈何 提交于 2019-12-10 23:27:46
问题 We need to conditionally make a row text as Bold. Currently its working on only single cell but we need to apply text bold on all columns cells. After applying the formatting 'isBold' column must be hide/remove. This column is used only for formatting. How to apply text-indent: 10px; of first column where the isBold column contains true value? Any possibility to achieve this? here is plunker http://plnkr.co/edit/YVGpi2FkwzCl3R1K8fwo?p=preview 回答1: This plunker is not valid any more. I believe

how to dynamically set the row height and column width in ag-grid

安稳与你 提交于 2019-12-10 20:53:43
问题 I have used using this trying to fit the column and row width how to dynamically set the row height and column width in ag-grid(please provide git hub code in typescript) 回答1: I am assuming that you want to set row height based on the content of a row. step 1 : set getRowHeight property to a javascript function. gridOptions.getRowHeight = rowHeightFn step 2 : define rowHeightFn based on your requirement. function rowHeightFn(params) { var result = 46; if (params.data.someKey === 2) { result =

Angular2 ag-grid datasource

六眼飞鱼酱① 提交于 2019-12-10 19:36:06
问题 I am trying to get a ag-grid datasource to work in angular2, although I got the feeling that I am nearly there I am not able to fix the following issue with my current knowledge of angular/typescript. The problem is that I have a function called returnRows, which works perfectly fine (see testdata variable). But the moment I try to call it within datasource.getRows I get the following exception: TypeError: this.returnRows is not a function in [gridOptions in PagetestComponent@2:2]. In the end

setColumnDefs is not working for some ag-grids

倾然丶 夕夏残阳落幕 提交于 2019-12-10 19:35:51
问题 I have several ag-grids in my code and the "setColumnDefs" is working for all the grids, however when I am trying to create a new grid, I am getting the error: Cannot read property 'setColumnDefs' of undefined. I don't know what I'm doing wrong. It seems to work for other ag-grids. vm.newGrid = { enableSorting: true, enableColResize: true }; var newGridColumns = [ { headerName: 'DATA', field: 'data', }, { headerName: 'PERCENT', field: 'percent' } ]; vm.newGrid.api.setColumnDefs(newGridColumns

EXCEPTION: No Directive annotation found on AgGridNg2

不想你离开。 提交于 2019-12-10 19:06:45
问题 Why this example on TypeSctipt with ag-grid isn't work? There is error in console: EXCEPTION: No Directive annotation found on AgGridNg2 Code of cars.ts with poblem line: import {Component, View} from 'angular2/angular2' import {CarsService} from './cars_service' @Component({ selector: 'cars', bindings: [CarsService] }) @View({ template: ` <ag-grid-ng2 id="cars" class="ag-fresh" [column-defs]="columnDefs" [row-data]="rowData"> </ag-grid-ng2> `, //////////////////////////////////// // Problem

Issues Customizing the Ag-Grid Themes

那年仲夏 提交于 2019-12-10 15:27:14
问题 How do I go about customizing the Ag-Grid themes (eg. ag-theme-material.css) in an existing Angular App? The documentation they have provided is lacking, as it doesn't explain how to perform these changes/configurations. Any help would greatly be appreciated. 回答1: Add ag-grid-overrides.scss file and put the saas variable you want to modify for the ag-grid theme. Full list of sass variables available can be found in this link - https://github.com/ag-grid/ag-grid/tree/master/src/styles. Import

Does ag-grid have an api to filter multiple checkbox values?

蹲街弑〆低调 提交于 2019-12-10 11:47:56
问题 I'm using angularjs and have a list of checkboxes that I need to able to filter my ag-grid on. This works fine using radio buttons and calling api.setQuickFilter with the individual value. However, I'm not seeing a way to allow for multiple 'filters' (i.e. checkbox values stored in an array) to function with setQuickFilter. Is there another method I should be using to accomplish this? Example: [checkbox] Apple [checkbox] Bee [checkbox] Cheerios Checking box Apple and Cheerios at the same time

Dynamically Setting Properties for ag-Grid

限于喜欢 提交于 2019-12-10 11:16:18
问题 I am having an issue with dynamically changing properties for ag-Grid. I have created a plunker to demonstrate the issue (see link below). I created 4 buttons. Each button updates a single grid property ( sideBar , enableFilter , enableSorting , and suppressMenuHide specifically). Each button will call a function for their 'click' event to toggle their respective property to true or false . The unexpected behavior I am seeing is that toggling the sideBar and enableFilter properties properly

AG-Grid: show certain “action” buttons in grid depending on condition

自闭症网瘾萝莉.ら 提交于 2019-12-10 10:03:41
问题 I'm using the community edition of "AG Grid" in my Angular 6 application. My challenge right now is this: I have a fairly simple data structure, a list of which gets bound to the grid for display. Based on its values, I'd like to add an "Actions" column to the grid, to give the user access to certain actions, e.g. delete an entry, "promote" it etc. For individual data-bound column, I get the corresponding data value of each row as it's being bound, and I can e.g. format the display using a