ag-grid

Ag-grid bundle size is too big

筅森魡賤 提交于 2019-12-06 23:45:05
问题 I am developing a web application with Angular 6. I have an Ag-grid enterprise edition. Ag-grid documentation says, that we have to import all ag-grid-angular , ag-grid-community , and ag-grid-enterprise to work with Ag-grid enterprise. After compiling, the total main bundle size crosses 1.5 MB. In that ag-grid-community is 694KB and ag-grid-enterprise is 230 KB: Is this the normal behavior of Ag-grid? I am using Ag-grid version 19.0.0 and the following command for building: ng build --prod -

AG-Grid: Make editable columns based on response from server

断了今生、忘了曾经 提交于 2019-12-06 19:31:31
I need some help for work. The story goes like this: I need to make the "Date" Column editable if Item-Id !== null; We have a "view" where we have an inbox created with AG-Grid. The inbox looks like this: ---| Item-Id | Date | Justification |--- ---------------------------------------- ---| |24.05 | text |--- ---------------------------------------- ---| 31 |25.05 | text 2 |--- ---------------------------------------- ---| 31 |25.05 | text 2 |--- ---------------------------------------- ---| |24.05 | text |--- ---------------------------------------- ---| |24.05 | text |--- -------------------

AG-Grid large dataset render time (slow)

空扰寡人 提交于 2019-12-06 18:18:20
问题 I have a grid with a large but reasonable amount of data (approx 12,000 cells... 340 columns and 34 rows). I know that seems like a sideways table but it just happens that for our application, it's more likely to have tons of columns and fewer rows. When the data was about 2300 cells (68 columns and 34 rows), it was fast enough that I could call it "immediate". Nothing I'd worry about. Increasing it 5x has caused an exponential increase in initial render time. Specifically, the creation of

referencing 'this' in ag-grid events

拥有回忆 提交于 2019-12-06 13:52:05
问题 In ag-grid events, e.g. onRowSelected(), 'this' refers to the grid object. However, I need to reference component variables and don't know how to. What I did was this, but it is a hack: initializeGridOptions() { this.gridOptions = { columnDefs: [ { headerName: "Core #", field: "coreNumber", width: 100, sort: 'asc' }, onRowSelected: this.onRowSelected, } this.gridOptions['_this'] = this; // HACK } onRowSelected(event: any) { if (event.node.selected) { (this as any)._this.selectedNode = event

Angular2 ag-grid datasource not working

你说的曾经没有我的故事 提交于 2019-12-06 09:17:22
I am trying to get my ag-grid working but I get an error. Here is the code: import { Component, OnInit } from '@angular/core'; import {AgGridNg2} from 'ag-grid-ng2/main'; import {GridOptions} from 'ag-grid/main'; import {ClientsService} from './clients.service'; @Component({ moduleId: module.id, selector: 'clients', directives: [AgGridNg2], templateUrl: 'clients.component.html', providers: [ClientsService] }) export class ClientsComponent implements OnInit { private gridOptions: GridOptions; private showGrid: boolean; private rowData: any[]; private columnDefs: any[]; private rowCount: string;

Using cellRendererFramework in Angular 5 ag-grid data table

孤人 提交于 2019-12-06 06:24:46
问题 I am building a app in angular 5. In my HTML page, I have a table which shows the data on being queried. This data is being displayed in ag-grid using directive. One of the column in grid is displayed as HTML link. I am using cellRendererFramework feature to show the values in column as link. It is working fine and displays the link on the value for that column in table for each row. My requirement is that I want to pass additional parameter to cellRendererFramework component from the main

how to disable editing for only some rows in ag grid

爷,独闯天下 提交于 2019-12-06 05:13:42
问题 i want to enable only some rows in my ag-grid(exemple :2/5) based on a condition . editable:false can't help because it is applied on the whole list unless if there is a method I do not know any help please 回答1: You can just bind function to editable property in columnDef , which will be executed on each try of edit editable: this.checkEditFunction.bind(this) ... checkEditFunction(params){ //params.node - for row identity //params.column - for column identity return !params.node.isRowPinned()

How to upgrade/refresh the ag-grid after row delete?

笑着哭i 提交于 2019-12-05 15:09:14
问题 I have an ag grid where i am trying to delete a row...I am able to remove the row from data source using "splice" technique,after that i want to refresh the table.But it is showing error.This is the code which i am using to delete a row selectedvalue={} //this holds the selected row value rowData=[]; //this holds all the row data onRowSelected(event) { this.selectedvalue = event; } deletebtn() { for (let i = 0; i < this.rowData.length; i++) { if (this.selectedvalue.node.data.make === this

Ag-grid bundle size is too big

有些话、适合烂在心里 提交于 2019-12-05 03:43:40
I am developing a web application with Angular 6. I have an Ag-grid enterprise edition. Ag-grid documentation says, that we have to import all ag-grid-angular , ag-grid-community , and ag-grid-enterprise to work with Ag-grid enterprise. After compiling, the total main bundle size crosses 1.5 MB. In that ag-grid-community is 694KB and ag-grid-enterprise is 230 KB: Is this the normal behavior of Ag-grid? I am using Ag-grid version 19.0.0 and the following command for building: ng build --prod --aot --build-optimizer --vendor-chunk=true This is something that we know and we have in our backlog

how to disable editing for only some rows in ag grid

ⅰ亾dé卋堺 提交于 2019-12-04 12:03:52
i want to enable only some rows in my ag-grid(exemple :2/5) based on a condition . editable:false can't help because it is applied on the whole list unless if there is a method I do not know any help please You can just bind function to editable property in columnDef , which will be executed on each try of edit editable: this.checkEditFunction.bind(this) ... checkEditFunction(params){ //params.node - for row identity //params.column - for column identity return !params.node.isRowPinned() // - just as sample } .bind(this) - just for accessibility of external functions You can call stopEditing()