ag-grid

Ag Grid - How to set the width and height of a standard cell editor to the full width and height of the cell

别说谁变了你拦得住时间么 提交于 2020-01-14 09:48:09
问题 I have a standard cell editor and when I am in edit mode the width and the height of the cell editor is not the full width and height of the cell. Should I overwrite the styles or is there any flag in the configuration to turn off this effect? 回答1: I had this same problem. If you look at the DOM, you'll see ag-grid adds a wrapper div around all custom editors, and it's actually that div that is the problem. I solved it by adding this to my global CSS: .ag-react-container { // This class is

Ag-Grid : How to get the focused cell value

孤街醉人 提交于 2020-01-14 09:19:05
问题 How to get the focused cell value at the time focussing on the cell by using the keyboard arrow keys 回答1: You can either get the focused cell by using var focusedCell = gridOptions.api.getFocusedCell(); or use the onCellFocused event. Both give you the following properties: rowIndex: number column: Column Use the row-index to retrieve the row-node: var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex); After that you can use those properties to retrieve the raw value of the cell: var

Ag grid Server side pagination

不羁岁月 提交于 2020-01-12 05:51:07
问题 I'm trying to implement a server side pagination in ag-Grid where I'll make a SOAP call each time I click on the next/previous button. I have already implemented the function with the specific page number so I can retrieve my row data and pass it to the Grid. Any good examples on how to do that? Thanks in advance. 回答1: After digging ag-grid Library for the whole day , I finally found the solution. First Lets include the following options in our GridOptions; GridOptions : gridOptions:

Clickable url value in ag-grid with react

佐手、 提交于 2020-01-11 08:48:30
问题 I'm currently giving ag-grid a try and trying to build a table where if the user clicks a column value, they are taken to a page containing that entry's details. How can I make a cell value clickable in ag-grid? I've tried using valueGetter: this.urlValueGetter with columnDefs and: urlValueGetter(params) { return '<a href=\'bill/' + params.data.id + '\'>details</a>'; } but it now looks like this: I then tried using template: '<a href=\'bill/{id}\'>details</a>' which does show the cell text as

ag-grid cell rendering error

萝らか妹 提交于 2020-01-06 21:09:53
问题 I am using the AG-GRID api to populate a table in my website under the main.ts file i have added the following code import { bootstrap } from 'angular2/platform/browser'; import { AppComponent } from './app.component'; import { ROUTER_PROVIDERS } from 'angular2/router'; import { AgGridModule } from 'ag-grid-ng2/main'; bootstrap(AppComponent, [ROUTER_PROVIDERS],AgGridModule); my main component.ts file is as following import { Component } from 'angular2/core'; import { GridOptions } from 'ag

ag-grid column headers stacked to the left

自古美人都是妖i 提交于 2020-01-06 19:53:26
问题 Only the first column header is being drawn correctly, all subsequent items in the columnDef array are drawn below it. If I populate the table with data, all column data is stacked to the left as well. Here's what it looks like; the gray band in the row, below Country is actually moving down, as part of the framework.setTimeout() function in ag-grid.js. The JS looks like: gridOptions.columnDefs = [ { headerName: 'Country', field: 'country' }, { headerName: 'City', field: 'city' }, {

How to customize autoGroupColumnDef's headerGroup cell?

流过昼夜 提交于 2020-01-06 18:08:19
问题 I have a AG-grid set up with autoGroup and other column groups. I am able to set the group names on the other columns but not the first column, which is the auto group. How do I access the first cell? In the plunker example, the cell above 'test'. https://plnkr.co/edit/LgOOxMJpGwDcMdIq4Y5j?p=preview <AgGridReact // autoGroupColumnDef={this.state.columnDefs} columnDefs={this.state.columnDefs} frameworkComponents={this.state.frameworkComponents} rowData={this.state.rowData} defaultColDef={this

ag-grid: Need to aggregate multiple fields into a table within a cell

戏子无情 提交于 2020-01-06 06:52:41
问题 I'm wondering what the best practice is for displaying a table (with data from multiple fields ) within a cell in ag-grid ? I think I can get it to work with formatting the entire table as an html string and passing that to the grid as the field and using a cellRenderer , however I'd rather not have that kind of view logic on the server-side. I'd really like for the column definition to be able to take in more than one field, but it doesn't seem like that's possible. Any ideas? Thanks. 回答1:

ag-grid: Need to aggregate multiple fields into a table within a cell

我怕爱的太早我们不能终老 提交于 2020-01-06 06:52:36
问题 I'm wondering what the best practice is for displaying a table (with data from multiple fields ) within a cell in ag-grid ? I think I can get it to work with formatting the entire table as an html string and passing that to the grid as the field and using a cellRenderer , however I'd rather not have that kind of view logic on the server-side. I'd really like for the column definition to be able to take in more than one field, but it doesn't seem like that's possible. Any ideas? Thanks. 回答1:

Not able to get the values of a sorted ag-grid column in an array using Protractor and Typescript

情到浓时终转凉″ 提交于 2020-01-06 06:39:14
问题 I have to verify the sorting function in an ag-grid. When the UI is opened, the column data will be in some order. I am sorting it in ascending order and then storing the values in a array. ag_grid_utils.clickOnHeader("Name"); var testArr=[]; element.all(by.css('div.ag-body-container div[col-id="Name"]')) .map(function (Element) { element.getText().then(function (result) { console.log("result :: "+result); testArr.push(result); }); }) However when I print the array, the values are not sorted.