ag-grid-angular

ag-grid set cellRendererParams to values from the row data

£可爱£侵袭症+ 提交于 2020-12-15 05:45:06
问题 I want to send data to my cellRenderer component via the cellRendererParams object but I don't know how to access row data for this. Here's an example of what I want to do: cellRendererParams: { label: currentRowData.myField + currentRowData.myOtherField } I don't want my cellRenderer component to have knowledge of the data structure of the grid since I may use it in other grids with different row data. 回答1: there are many ways: 1) valueGetter: (params) => ({ property1: params.data.myField1 +

Angular Ag-Grid: Add PrimeNg P-dropdown as html element in Ag Grid cells

寵の児 提交于 2020-08-09 13:59:22
问题 How to include basic HTML elements in Ag-Grid cells. Below is my html PrimeNg p-dropdown in MyComponent.html <p-dropdown [options]="cars" [(ngModel)]="selectedCar" (click)="doSomething()" [style]="{'width':'150px'}"></p-dropdown> And ag-grid now to be used to include above p-dropdown in one of the cells <ag-grid-angular #agGrid style="width: 100%; height: 350px;" class="ag-theme-alpine" [gridOptions]="gridOptions" [rowData]="rowData" [columnDefs]="columnDefs"> </ag-grid-angular> And below is

Angular Ag-Grid: Add PrimeNg P-dropdown as html element in Ag Grid cells

与世无争的帅哥 提交于 2020-08-09 13:58:50
问题 How to include basic HTML elements in Ag-Grid cells. Below is my html PrimeNg p-dropdown in MyComponent.html <p-dropdown [options]="cars" [(ngModel)]="selectedCar" (click)="doSomething()" [style]="{'width':'150px'}"></p-dropdown> And ag-grid now to be used to include above p-dropdown in one of the cells <ag-grid-angular #agGrid style="width: 100%; height: 350px;" class="ag-theme-alpine" [gridOptions]="gridOptions" [rowData]="rowData" [columnDefs]="columnDefs"> </ag-grid-angular> And below is

Is there a way to group rows in ag-grid without the enterprise version?

丶灬走出姿态 提交于 2020-07-22 01:38:26
问题 I'm using ag-grid in my application and want to have a row have child rows that expand when clicked (similar to master/detail, row grouping, or tree data). However, all of these are enterprise features. Is there a way to achieve similar functionality without an enterprise license? Row Grouping: https://www.ag-grid.com/javascript-grid-grouping/, Master/Detail: https://www.ag-grid.com/javascript-grid-master-detail/, Tree Data: https://www.ag-grid.com/javascript-grid-tree-data/ 回答1:

Is there a way to group rows in ag-grid without the enterprise version?

天大地大妈咪最大 提交于 2020-07-22 01:37:10
问题 I'm using ag-grid in my application and want to have a row have child rows that expand when clicked (similar to master/detail, row grouping, or tree data). However, all of these are enterprise features. Is there a way to achieve similar functionality without an enterprise license? Row Grouping: https://www.ag-grid.com/javascript-grid-grouping/, Master/Detail: https://www.ag-grid.com/javascript-grid-master-detail/, Tree Data: https://www.ag-grid.com/javascript-grid-tree-data/ 回答1:

Ag-grid: keep open tooltip for a certain predefined time

淺唱寂寞╮ 提交于 2020-07-05 15:41:20
问题 I am using Ag-grid v23.1.1 I need to show a tooltip for 1 minute. Ag grid does not support this case But earlier in version 22 I have used next lifehack params.api.context.beanWrappers.tooltipManager.beanInstance.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT = 0; params.api.context.beanWrappers.tooltipManager.beanInstance.DEFAULT_HIDE_TOOLTIP_TIMEOUT = 60000; params.api.context.beanWrappers.tooltipManager.beanInstance.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT = 3000; But in the current version (23) tooltipManager has

increase height of a specific row

房东的猫 提交于 2020-06-29 04:32:10
问题 Initially, all rows will have the same height of 50. When a cell is focused,if it has more content and requires more height, I need to increase the height of that particular cell. If that is not possible, atleast that entire particular row's height has to be increased. The remaining rows should not get effected. 回答1: I would make use of rowSelection api particularly the selected property of each rowNode . You can define getRowHeight in html [getRowHeight]="getRowHeight" and (selectionChanged)