ag-grid

AG-Grid: Cannot update field in Grid as it is read only

空扰寡人 提交于 2019-12-11 17:14:49
问题 I am trying to update a field in ag-grid and it keeps coming back with ERROR TypeError: Cannot assign to read only property 'quantity' of object '[object Object]'. It allows me to edit the cell but when i try to update it comes up with this error. I am using an observable from an ngrx store to populate the rowData as below: this.order$.subscribe(order => { this.order = { ...order, products: [...order.products] }; }); I have checked the above and I can update this object by saying this.orders

External Style file not loaded in polymer 3 application deployed to Spring mvc application

*爱你&永不变心* 提交于 2019-12-11 16:58:13
问题 Styles are loaded in template: static get template() { return html` <style> :host { display: block; border: double; background-color: lightsteelblue; } </style> <iron-ajax auto url="http://localhost:8000/api/clients" handle-as="json" last-response="{{_getClientsResponse}}"></iron-ajax> <h2>Hello [[prop1]]!</h2> <div>host</div> <link rel="stylesheet" href= "/node_modules/ag-grid-community/dist/styles/ag-grid.css"> <link rel="stylesheet" href= "/node_modules/ag-grid-community/dist/styles/ag

Custom filter: can I have custom buttons for filter?

随声附和 提交于 2019-12-11 15:27:17
问题 I am trying to have my own custom filter on ag-grid angular. Apart from Apply button, I also want to have other buttons for the filter. i.e. if I can explain this in some sort of UI, |--Custom Filter-------------------. | Filter Text: _____________ | | Apply | Clear | Clear All | |_______________________| By using default filter component of ag-grid , I know that I can have two buttons I need if I provide filterParams in ColDef . filterParams: { applyButton: true, clearButton: true } But what

CSS: Bootstrap drowpdown hides behind grid cell

霸气de小男生 提交于 2019-12-11 14:57:08
问题 Hi Have a grid implemented third-party library AG-Grid . This grid has editable feature to edit rows. And while editing I am rendering Bootstrap dropdown to update value of Year column as shown in below example: Editable Grid - Dropdown Issue When I click on the dropdown its li elements are not displaying properly as it is hidden behind the grid. Is there any solution for this ? 回答1: This is a bit old, but for anyone else looking: If you set the isPopup() function on your cell editor to

Event listener works outside of the grid but doesn't work inside a cell in ag-grid

陌路散爱 提交于 2019-12-11 14:55:10
问题 I have been struggling with making a simple listener work inside of a cell in ag-grid. What's bothering me is that it works perfectly if I place it in the html file. In app.component.html: <select class="form-control" (change)=" RefreshRisqueBrutColumn();" > <br> <option>1- Très improbable</option> <option>2- Peu probable</option> <option>3- Possible</option> <option>4- Probable</option> </select> In app.component.ts, I have the listener definition: public RefreshRisqueBrutColumn() { const

cellClicked don't call function AgGrid Angular 2

柔情痞子 提交于 2019-12-11 14:54:59
问题 I want do "click" in my cell and show console.log, but this function doesn't run: headerName: 'Id', field: 'id', cellClicked: function() { console.log('asssaasas'); } I did click in my cell the AgGRID but in html5.console I don't show nothing.... 回答1: Seems like you are adding cellClicked event at column level - within ColDef . It doesn't work that way. It's a grid level event. <ag-grid-angular #agGrid class="ag-fresh" ..... (cellClicked)="onCellClicked($event)" .... > </ag-grid-angular> And

How to expand the first group level in ag-grid-angular

天涯浪子 提交于 2019-12-11 12:03:35
问题 I have an ag-grid where rows are grouped by two columns by default, but the groups are collapsed. colDefs = [ { field: 'colA', rowGroupIndex: 0, }, { field: 'colB', rowGroupIndex: 1 }, … ]; I would like to have the first group level expanded like this: - ColA 1 + COlB 1 (5) + ColB 2 (3) - ColA 2 + COlB 3 (1) + COlB 4 (9) + COlB 5 (11) Where is the best place to expand the first level groups? 回答1: Have a look at the plunk I've created: ag-grid: expand groups in ag-grid-angular this.gridApi

AgGrid custom html on drag

社会主义新天地 提交于 2019-12-11 11:11:47
问题 I'm jsut looking into changing the drag hover of the aggrid component. i cant find much on it... Anyone knows how to change the styles of the row in drag mode? My goal is to have a different animation (full row) like material UI/UX https://material.io/design/components/lists.html#behavior 回答1: So, actually, there is no possibility for now to modify 'ghost' template, you can try to explore deeper than I did, here is an entry point: ag-grid\src\ts\dragAndDrop\dragAndDropService.ts and

On upgrade ag-grid version 19 from version 9, on right click tool panel option is not coming

岁酱吖の 提交于 2019-12-11 11:05:33
问题 On upgrade ag-grid version 19 from version 9, on right click tool panel option is not coming. Also we have an icon on click we opened a tool Panel for pivot that too is not working. This is the current code we have on click of it. This worked well for ag-Grid 9 but not working for ag-Grid 19 this.preferencesService.togglePivot.subscribe(() => { const isOpen = this.gridOptions.api.isToolPanelShowing(); if (isOpen) { this.gridOptions.columnApi.setColumnState(this.saveGridState); this

Ag-grid pivot group count

梦想与她 提交于 2019-12-11 09:46:33
问题 I'm using Ag-grid 16.0 with Angular 5. I want to hide count of pivot group. rowGroup: true, cellRenderer:'agGroupCellRenderer', cellRendererParams: { suppressCount: false, // turn off the row count } suppressCount: false doesn't work for me. How could I delete the count of pivot group? Thank you for helping me in advance. @pivot group count image 回答1: Should be cellRendererParams: { suppressCount: true } 来源: https://stackoverflow.com/questions/48660997/ag-grid-pivot-group-count