ag-grid

How to insert row at index into sorted ag-grid

落花浮王杯 提交于 2020-07-08 18:19:14
问题 I have a grid setup with sorting enabled. Each row has a duplicate button. When duplicating a row, I would like to insert the new row just below the copied row. This works with a default sort but if you sort it on a column like for example status, it randomly inserts the row into the grid, making it hard to find. I have noticed that the grid does a sort sometime during save, yet before it gets a response to assign a new id. I have tried adding the row using updateRowData(transaction) with an

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

Ag grid: column filters are not updating after adding the row

早过忘川 提交于 2020-07-04 02:48:10
问题 I have created Ag-grid with custom column filter. When I add the row in the table filter is not updating. https://stackblitz.com/edit/ag-grid-custom-filter Expert Advise please? HTML <ag-grid-angular #agGrid class="ag-theme-balham cis-ag-grid" [defaultColDef]="defaultColDef" [columnDefs]="columnDefs" [rowSelection]="rowSelection" [rowData]="rowData" [suppressMenuHide]="true" [rowDragManaged]="true" [frameworkComponents]="frameworkComponents" (selectionChanged)="onSelectionChanged()"

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)

AG Grid inserting rows with applyTransaction

♀尐吖头ヾ 提交于 2020-06-29 04:19:18
问题 Is there a way to insert rows at a specific index rather than at the end of the grid? Example would if I want to insert a row 10 rows from the top? Or in the middle? I did find an old ag grid method called insertItemAtIndex(index, [rows]); but this isn't working and says it's deprecated. Is there a way to do this with applyTransaction(transaction) ? 回答1: The RowDataTransaction interface has an optional addIndex property - export interface RowDataTransaction { /** deprecated */ addIndex?:

Pass data between 2 components in Angular

落爺英雄遲暮 提交于 2020-06-29 04:18:13
问题 I'm trying to pass data from my ag-Grid to a form in a new component by clicking on the row. I could get the data from the row by clicking on the cell via onCellClicked . But i don't know how to pass it to my other component now. here is my 2 interfaces : and here is my code : ag-Grid.ts : import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Grid, GridApi } from 'ag-grid-community'; import { AgGridAngular } from 'ag-grid-angular';

How to keep the cell highlighted while editing

守給你的承諾、 提交于 2020-06-29 04:05:17
问题 I have a developed a custom drop-down renderer and drop-down cell editor. When the cell is highlighted by single clicking, the following css is applied to get the effect as shown in picture .ag-cell:focus { border-radius: 5px; border: 2px solid blue !important; } I would like to have the same css on the cell when it is being edited by double clicking the cell. At present, the cell highlighting is missing as shown in the below image 来源: https://stackoverflow.com/questions/61821748/how-to-keep

How to keep the cell highlighted while editing

喜你入骨 提交于 2020-06-29 04:04:15
问题 I have a developed a custom drop-down renderer and drop-down cell editor. When the cell is highlighted by single clicking, the following css is applied to get the effect as shown in picture .ag-cell:focus { border-radius: 5px; border: 2px solid blue !important; } I would like to have the same css on the cell when it is being edited by double clicking the cell. At present, the cell highlighting is missing as shown in the below image 来源: https://stackoverflow.com/questions/61821748/how-to-keep

How to make ag-grid autoHeight in infinity mode

若如初见. 提交于 2020-06-29 03:39:13
问题 I wanted to make my table height auto using ag-grid. for your information i am using ag-grid infinity mode for rendering table. I am using ag-grid for vanilla javascript. I already tried the autoHeight that is suggested by documentation but it doesn't work. column_defs: [ { autoHeight: true, cellStyle: {"white-space": "normal"}, field: "paragraph", headerName: "paragraph", width: 100 } ] var gridOptions = { defaultColDef: { sortable: true, filter: 'agTextColumnFilter', filterParams:{

How to detect cell blur (out of focus) event in Ag-grid

二次信任 提交于 2020-06-28 07:15:20
问题 I need to detect when the grid cell loses focus in ag grid. I've checked the available API in the docs but didn't find anything similar to cell blur. https://www.ag-grid.com/javascript-grid-events/ Any suggestions how to check it? 来源: https://stackoverflow.com/questions/61949782/how-to-detect-cell-blur-out-of-focus-event-in-ag-grid