ag-grid

How to always show the horizontal scroll bar in ag-grid?

好久不见. 提交于 2019-12-23 02:33:08
问题 Is it possible to always show the horizontal scroll bar in an ag-grid? This question was asked as an issue on their GitHub page, but they seem to have ignored it (best I can tell, it was not created in their own issue tracker). I'm open to official solutions, CSS hacks, anything that works really. 回答1: You could set it by CSS .ag-body-viewport-wrapper.ag-layout-normal { overflow-x: scroll; } For live example, refer to this Plunk Try removing columns from column-menu and you'll see that

Angular2 ag-grid datasource not working

删除回忆录丶 提交于 2019-12-22 18:35:20
问题 I am trying to get my ag-grid working but I get an error. Here is the code: import { Component, OnInit } from '@angular/core'; import {AgGridNg2} from 'ag-grid-ng2/main'; import {GridOptions} from 'ag-grid/main'; import {ClientsService} from './clients.service'; @Component({ moduleId: module.id, selector: 'clients', directives: [AgGridNg2], templateUrl: 'clients.component.html', providers: [ClientsService] }) export class ClientsComponent implements OnInit { private gridOptions: GridOptions;

How to get the data of selected row in ag grid in angular2?

被刻印的时光 ゝ 提交于 2019-12-21 03:57:33
问题 I have setup ag-grid in angular2 which works fine but i am not able to get the value of selected row...There are no errors in my console window...This is how i am initialising the grid... import {Component} from 'angular2/core'; @Component({ selector: 'aggride', template: ` <div class="tr-card" > <ag-grid-ng2 #agGrid of mgrid class="ag-fresh" rowHeight="40px" [columnDefs]="columnDefs" [rowData] = "rowData" enableCellExpressions="true" enableSorting="true" unSortIcon="true" rowSelection=

ag-grid vs slick-grid vs angular-grid which is better? [closed]

雨燕双飞 提交于 2019-12-20 08:34:27
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Recently we thought to change our current grid tool. Currently we're using kendo-ui for grid and all. After searching we came with 3 results. But, still we're not sure which is better and why in future run. While using kendo we missed having control over it. It would be a

ag-grid server side infinite scrolling accessing props

纵饮孤独 提交于 2019-12-20 07:37:04
问题 I'm attempting to implement ag-grid server side row model as described in their documentation here. What I'm attempting to do is pass the api call along with it's parameters as props to the grid component. The problem is that when trying to access the props via this.props or state via this.state they are both undefined. My code looks like this: onGridReady(params) { this.gridApi = params.api; this.gridColumnApi = params.columnApi; this.gridApi.showLoadingOverlay(); var dataSource = { rowCount

value undefined in angular2

爷,独闯天下 提交于 2019-12-20 05:01:33
问题 I am creating a application in which i am using the Ag-Grid api for listing my database content on the web page. Ag-grid have a predefined api to get the selected row content. Here i my code : export class customer_entryComponent{ public gridOptions:GridOptions; constructor(private wakanda: Wakanda){ this.gridOptions = <GridOptions>{ context : { componentParent : this } }; this.gridOptions.columnDefs = this.createColumnDefs(); this.gridOptions.rowData = this.createRowData(); this.gridOptions

Dynamic change of cell color with Ag Grid

让人想犯罪 __ 提交于 2019-12-20 03:52:07
问题 We are trying to dynamically change the cell color of a column in Ag Grid. Here is the code. I didn't include the code that pulls the data from the database since that works just fine. HTML (to define the grid): <ag-grid-angular #eventsGrid2 style="width: 1200px; height:300px;" class="ag-theme-balham" [rowData]="myEventsGrid" [columnDefs]="eventsCols" (gridReady)="onGridReady($event)"> </ag-grid-angular> JS: export class DataVis { @ViewChild('eventsGrid2') eventsGridComponent2: agGridNg2;

How to initialize ag-grid api in angular2 application

蓝咒 提交于 2019-12-19 09:58:21
问题 I am working on an application built using angular2 with typescript. I am using ag-grid to display data in grid but not able to find the grid api. /// <reference path="../../../typings/jquery/jquery.d.ts" /> import {Component} from 'angular2/core'; import {Hero, HeroService} from './hero.service'; var gridOptions; var heroService; import * as core from 'angular2/core'; declare var ag: any; ag.grid.initialiseAgGridWithAngular2({ core: core }); @Component({ selector: 'gridapp', template: `<ag

How do I get and set ag-grid state?

独自空忆成欢 提交于 2019-12-18 11:48:48
问题 How can I obtain and re-set the state of an ag-grid table? I mean, which columns are being show, in what order, with what sorting and filtering, etc. Update : getColumnState and setColumnState seem to be close to what I want, but I cannot figure out the callbacks in which I should save and restore the state. I tried restoring it in onGridReady but when the actual rows are loaded, I lose the state. 回答1: I believe you are looking for this page of the Docs. This describes the column api and what

AG Grid: Better way for validation row - valueSetter?

偶尔善良 提交于 2019-12-18 07:24:29
问题 Is there a better way to validate a row in ag-grid than with valueSetter ? I can achieve the validation with that but I am not sure, if there is a better way. https://www.ag-grid.com/javascript-grid-value-setters/#properties-for-setters-and-parsers I want to validate two fields in the row. DateFrom and DateUntil (they are not allow to be null and DateFrom must be lower than DateUntil). 回答1: There are two ways of possible validation handling: First: via ValueSetter function and Second: via