ag-grid

agGrid in react + redux app is modifying underlying data

余生颓废 提交于 2019-12-02 15:35:46
问题 I'm using latest agGrid enterprise in react + redux app. The issue is that I'm using built in editing of agGrid and this is modifying directly underlying data i.e. array that is returned from redux store. This is breaking immutability principle. Is there way to use/configure agGrid no to modify the data but to: react to change and call some callback with info about the change then I could update redux store (one item in the array) then agGrid could detect that only single object in array got

How to show and use radio button on ag-grid?

对着背影说爱祢 提交于 2019-12-02 12:59:34
I am learning ag-grid and tried following code to show checkbox in my application. In app.component.html: <ag-grid-angular style:"width: 500px; height: 500px;" class: "ag-theme-balham" [rowData]="rowData" [columnDefs]="columnDefs" rowSelection="multiple" [gridOptions]="gridOptions" [gridReady]="onGridReady($event)"> </ag-grid-angular> In AppComponent.ts: export class AppComponent implements OnInit { @ViewChild('agGrid') agGrid: AgGridNg2; private gridApi; private gridColumnApi; gridOptions: GridOptions; columnDefs = [ {headerName: 'Make', field: 'make', checkboxSelection: true}, {headerName:

ag-grid server side infinite scrolling accessing props

落爺英雄遲暮 提交于 2019-12-02 10:26:25
I'm attempting to implement ag-grid server side row model as described in their documentation here . What I'm attempting to do is pass the api call along with it's parameters as props to the grid component. The problem is that when trying to access the props via this.props or state via this.state they are both undefined. My code looks like this: onGridReady(params) { this.gridApi = params.api; this.gridColumnApi = params.columnApi; this.gridApi.showLoadingOverlay(); var dataSource = { rowCount: null, getRows: function(params) { setTimeout(function() { let serviceParams = this.props

Angular 5 - ag-grid 18.0.1 - edge crash

不问归期 提交于 2019-12-02 09:53:37
I've been searching everywhere and was unable to find any information related to this- most likely because ag-grid update 18.x is new. Anyhow: It appears that after updating ag-grid from 17.1.1 to 18.0.1, any page with the ag-grid on it ends up crashing EDGE and IE. Chrome works fine. (There have always been performance issues with EDGE and IE but now ag-grid fails to even load). My current project is using: Angular 5 in VSCode, AG-GRID, etc. An error I was able to view in the console was onGridResize no longer exists; However I am not calling this event what-so-ever. So this appears to be

Angular: AgGrid will not update rows when subscribing to Observable

一曲冷凌霜 提交于 2019-12-02 09:26:19
I am trying to incorporate rxjs and observables into ag grid. For practice, I am following an official ag grid example: https://www.ag-grid.com/javascript-grid-rxjs/ I am currently using Angular 6. I changed the js file to be a ts file and made the appropriate changes. I also do not include any scripts in my index file. I was getting a bunch of MIME errors anytime I called a script. So I converted to code to strictly angular. I believe this is what is causing my issue. My goal is to have random rows change their values without having to refresh the web page when I subscribe to my updates

ag-grid and angular, how to switch grid options dynamically

点点圈 提交于 2019-12-02 07:24:57
I have two different grid configurations (represented as two gridOption objects). One is loading local data, where the other one is using an elasticsearch datasource with the infinite row model. If I wire them in the template [gridOptions]="localOptions" , [gridOptions]="elasticGridOptions" both work perfectly well. This is my current component and (schematically) what I want to achieve: @Component({ selector: 'app-gridtest', styleUrls: ['./gridtest.component.css'], template: ` <ag-grid-angular id="grid" style="width: 100vw;" [style.height] = 'height' class="ag-theme-balham ag-grid"

value undefined in angular2

无人久伴 提交于 2019-12-02 07:22:25
I am creating a application in which i am using the Ag-Grid api for listing my database content on the web page. Ag-grid have a predefined api to get the selected row content. Here i my code : export class customer_entryComponent{ public gridOptions:GridOptions; constructor(private wakanda: Wakanda){ this.gridOptions = <GridOptions>{ context : { componentParent : this } }; this.gridOptions.columnDefs = this.createColumnDefs(); this.gridOptions.rowData = this.createRowData(); this.gridOptions.rowSelection = 'single'; this.gridOptions.onSelectionChanged = this.onSelectionChanged; } private

Set new column definition by setColumnDefs doesn't work anymore

北城余情 提交于 2019-12-01 17:43:41
问题 I'm trying to set new column definitions by calling setColumnDefs using the grid API. This doesn't work as expected. The names of the column headers will not be updated anymore! See this Plunkr: Version 19.1.x Version 19.0.0 is latest working version. See this Plunkr: Version 19.0.0 For me it seems to be a bug!? In my project I'm using Angular 5 and I notice the same behaviour. 回答1: I was able to reproduce your behaviour. The following (dirty) workaround works: gridOptions.api.setColumnDefs([

Angular 6 and Ag-grid

╄→尐↘猪︶ㄣ 提交于 2019-12-01 12:25:51
I'm doing a test with Angular 6 and Ag-Grid. I have done an example and it paints it, I mean the css and so on. But by doing the example below and enter the real data from my Back-end does not paint the table and comes out all the time "loading" // package.json "dependencies": { "ag-grid-angular": "^19.0.0", "ag-grid-community": "^19.0.0", // HTML <div class="container-fluid"> Competencias </div> <div class="jumbotron text-center"> <ag-grid-angular #agGrid style="width: 100%; height: 200px;" class="ag-theme-balham" [gridOptions]="gridOptions"> </ag-grid-angular> </div> // COMPONENT import {

Angular 6 and Ag-grid

冷暖自知 提交于 2019-12-01 11:30:51
问题 I'm doing a test with Angular 6 and Ag-Grid. I have done an example and it paints it, I mean the css and so on. But by doing the example below and enter the real data from my Back-end does not paint the table and comes out all the time "loading" // package.json "dependencies": { "ag-grid-angular": "^19.0.0", "ag-grid-community": "^19.0.0", // HTML <div class="container-fluid"> Competencias </div> <div class="jumbotron text-center"> <ag-grid-angular #agGrid style="width: 100%; height: 200px;"