ag-grid

Setting focus on stored previous element with Shift + Tab

狂风中的少年 提交于 2019-12-14 04:07:49
问题 I am trying to set focus back to the previously focused page element using Shift + Tab keys to set the focus on the previously focused element within the data grid, whether that be a header cell or body cell. It is currently pushing the focus back to the header cells, I suspect because they have a tab index. I'm using the following that should be looking for the stored previously active element, and applying focus-visible class back to it: document.querySelector('.ag-body').tabIndex=0;

ag-grid - how to get parent node from child grid via context menu?

此生再无相见时 提交于 2019-12-13 20:57:17
问题 As an example, I have a Master\Detail grid. Master\Detail defined as key-relation model and on getDetailRowData method parent node data exists in params but how to get parent node data from child view? Tried via context-menu: On right click - getContextMenuItems got executed which has an input params On this sample, child-grid doesn't have any row and node in context-params is null, it's ok, but anyway it should be possible to retrieve the parent details at least via grid API, isn't it ? Then

Refresh ag-grid on Observable subscribe

ε祈祈猫儿з 提交于 2019-12-13 17:59:31
问题 I am struggling to refresh ag-grid on subscription of an observable. I have following piece of code which works well. this.marketConfigs = this._regionProductConfigService.getMarketConfig(); this.gridOptions.columnDefs = this.createColumnDefs(); this.gridOptions.rowData = this.marketConfigs; But since I am trying to put a drop-down in columns of ag-grid, I wanted the column config to be created once we receive data. So I changed the code to following : this._refDataService.getAllCurrencies()

Exporting to excel with proper cell formatting on ag-grid

南楼画角 提交于 2019-12-13 17:49:54
问题 When I export a table to excel using ag-grid's own exportDataAsExcel() the resulting excel contains dates as General data type instead of Date . [ ] I have used this: exportDataAsExcel({ processCellCallback: ({col, val}) => {( /*date value formatting here*/ )} }) to format both Date , string with proper date formatting (DD/MM/YYYY) but I can't make excel properly recognize these cells as Date instead of General This is reproducible with the excel export examples on their website: https://www

Inconsistent Alphanumeric Sorting with ag-grid and String Cells [duplicate]

无人久伴 提交于 2019-12-13 17:44:34
问题 This question already has an answer here : How to make sorting key insensitive in ag-grid? (1 answer) Closed 4 months ago . Im using ag-grid-react to display a table of data from an endpoint. I have a column which contains alphanumeric values which needs to be sortable using a "natural" sort algorithm (i.e. numbers are grouped together, alphanumeric strings are grouped together...) Below is my column definition. Sorting is enabled on the grid, and when I click the column to sort the grid,

How to turn off ag-grid quick filter for specific column

前提是你 提交于 2019-12-13 17:02:13
问题 AG-grid has "quick filter" feature, essentially a free-text search filter that searches through all columns. The problem is, in some columns, I have date-time values and I don't want to search through data in those columns. Using "column filter" to filter on each column separately is not an option because this will give me "AND" behavior: only when all columns that I search through contain the data I search for will this column be visible. And I need "OR" behavior: a row that contains the

Ag-Grid header Component adding custom header templates

梦想的初衷 提交于 2019-12-13 15:23:06
问题 I'm still using Angular 1.x and ag-Grid (non-enterprise). But I'm trying to add tooltips from angular ui-bootstrap. So I need to add an attribute to all headers: "uib-tooltip='headerValue' " The issue is that it wants me to implement a whole new component. But the example component they put on the ag-grid website is super complicated and different from the default functionality. Why isn't there an easy way of doing these things? Why deprecate headerTemplate? So even if I want a slight change

How to get the number of filtered rows in ag-Grid?

牧云@^-^@ 提交于 2019-12-13 15:19:09
问题 I have an ag-Grid with filtering option. How to get the number of filtered rows without using forEachNodeAfterFilter callback? I want to enable a button only if there is a filtered row, and i don't want to perform a foreach loop in the background every time. 回答1: gridOptions.api.getModel().rootNode.childrenAfterFilter.length You should check out what else is available to you under rootNode , there are a few arrays that might be useful to you 回答2: What you are probably looking for is:

How to verify sorting of multiple ag-grid columns in Protractor

你说的曾经没有我的故事 提交于 2019-12-13 09:08:36
问题 I am using protractor for e2e testing. There is a ag-grid table where multiple columns are sorted in ascending order. How do i go about verifying this? Picture of Sample table 回答1: In AgGrid the rows might not always be displayed in the same order as you insert them from your data-model. But they always get assigned the attribute "row-index" correctly, so you can query for it to identify which rows are displayed at which index. So in your E2E-tests, you should create two so-called "page

Angular2 + Ag-grid - Is it possible to move up/down a row with a button?

眉间皱痕 提交于 2019-12-13 08:27:05
问题 I have a problem with my ag-grid array, I have this array : <div style="width: 100%;"> <ag-grid-angular #agGrid style="width: 100%; height: 200px;" class="ag-fresh" [gridOptions]="gridOptions" [rowData]="rowData" [columnDefs]="columnDefs" enableColResize rowSelection="multiple" (columnResized)="onColumnEvent($event)" (columnPinnedCountChanged)="onColumnEvent($event)"> </ag-grid-angular> </div> And I have two buttons : <div class="bouton" placement="top" ngbTooltip="Déplacer instruction vers