ag-grid

ag-grid does not refresh when using Observables

允我心安 提交于 2019-12-25 09:26:43
问题 I'm trying to bind the Angular-2 ag-grid with an Observable. The data in the grid is shown as expected when the grid loads for the first time. Following is the code that does this: this.settingsService.gen.subscribe( (settings) => { this.gridOptions.rowData = settings; }); I have set the grid options in the constructor of the typescript class in the component. Now, when I update the data for the observable, I see the updated changes propagated to the 'settings' (shown above), but the grid

Ag-grid inheritate functionality

孤人 提交于 2019-12-25 06:44:43
问题 im creating a custom filter, the functionality is basically the same that is built-in in the ag-grid. Is the: var NumberFilter = (function () { function NumberFilter() { } NumberFilter.prototype.init The only difference is that i only need to change the function NumberFilter.prototype.onFilterChanged To replace commas by dots. But to overwrite all the methods it doesnt makes much sense, is there a way in inherite the functionality of the filter 'number' and change only the NumberFilter

Uncaught TypeError: this.openA is not a function at HTMLButtonElement.onclick

拈花ヽ惹草 提交于 2019-12-25 01:45:34
问题 I'm trying to add button on column definition using ag grid, but I end up getting this error always. I tried using different ways to implement button but never found a solution. Get error on Edit_1 & it creates a new http request. In Edit_2 there's no response. Is there any other way to add button in ag grid. import React from 'react'; import ReactDataGrid from 'react-data-grid'; import { AgGridReact } from 'ag-grid-react'; import 'ag-grid-community/dist/styles/ag-theme-material.css'; import

Ag-Grid IE11 / React / WebPack does not load properly

爷,独闯天下 提交于 2019-12-24 23:30:36
问题 I am getting this error when I try out a simple rendition of ag-grid. The error occurs only in IE11. FF/Chrome/Edge are OK. Unable to get property 'addEventListener' of undefined or null reference Looks like it has something to do with how Webpack is bundling the scripts. Haven't been able to figure this one out. Any help is appreciated. Thanks. Update 2018-07-02 The order of my vendor and app files was incorrect. When I fixed the order, the grid issue was resolved, but it caused other (more

Display rowcount beside each filter at grid

*爱你&永不变心* 提交于 2019-12-24 20:44:59
问题 I am using AG grid enterprise to display my data. I have filters for each columns. I want to show the count of each filter element inside the filter drop-down itself. Please help. It's like if the filter shows that we have only us and Canada in the country column, I want to display the frequencies of us and canada inside parenthesis beside these filter elements 回答1: Update: added working sample filterParams: { cellRenderer: "countryFilterRenderer"} countryFilterRenderer(params) { let count =

How to implement validation rules for ag-grid row edit

删除回忆录丶 提交于 2019-12-24 19:34:55
问题 I currently have html table with inline editing that uses plain Angular Reactive Forms, including a lot of validation rules: var formArray = new FormArray(this.items.map(createItemFormGroup)); createItemFormGroup(item){ return new FormGroup({ prop1: new FormControl(item.prop1, [Validators.required, Validators.min(1)]) prop2:... }) } Is there any example of how to integrate ag-grid with Angular validations? The requirement is, that I need to highlight invalid cell values. I don't necessarily

Error when converting AG Grid to enterprise

本小妞迷上赌 提交于 2019-12-24 19:25:26
问题 I am currently trying to convert a project I have that is using AG Grid free to enterprise free trial. However, when following the instructions on the AG Grid site I am getting this error: Uncaught TypeError: Cannot read property 'EnterpriseCoreModule' of undefined Thinking it might probably be due to the project I created I tried building on a new one but I am still getting the same error. Has anyone encountered this error? Looked on the net and could didn't find any results. Can anyone help

Ag grid, prevent table to scale to full width

久未见 提交于 2019-12-24 19:00:24
问题 I have a table which scales to all available width even though its content is less . Demo: "https://plnkr.co/edit/6L8bTAwkEV6R6Be4M1Qm?p=preview" Tried to solve it by giving a parent a width and ag-grid max-width but as you see it has not effect. Has anyone any idea ? Thanks in advance. 回答1: You need to use sizeColumnsToFit() method. sizeColumnsToFit() Gets columns to adjust in size to fit the grid horizontally. Official doc Code: onGridReady(params) { this.gridApi = params.api; this

Wrap ag-grid in an Angular Directive

只愿长相守 提交于 2019-12-24 14:00:07
问题 I am creating a wizard to add a new appointment in our application. The last page of the wizard contains a tabbed section with all potential conflicts based on several criteria. Each tab is one of the criteria and uses an Angular Grid to show the list of conflicts. Since each grid has the same columns, but contains different data, I would like to use a directive to wrap the Angular Grid and its grid options in the Template and then set the rowData in another attribute on my directive. I

AG-Grid - How to increase row height dynamically?

三世轮回 提交于 2019-12-24 10:23:27
问题 This question is related to Ag-Grid row height on Angular 4 Project. Please see the below scenario:- I have an Ag-Gird having 3 columns respectively:- Id (resizable column from UI) Name (resizable column from UI) Address (resizable column from UI) I do not have any limitations( like the limited number of character or words is allowed) on Address column. Users can type any number of characters or words they want to. Issues:- How to increase the row height, when Address column width is