ag-grid-ng2 is now deprecated. Please use ag-grid-angular going forward. ag-grid-ng2 was used as a project that contains the Angular components for use with ag-Grid.
Questions tagged [ag-grid-ng2]
216 questions
39
votes
8 answers
How to disable selection of cells in ag-grid?
I have a simple ag-grid in an Angular project and want to disable selection of cells in one of its columns. Simply removing the default blue outline during selection would also be fine. I just want no visual change to the cell when the user clicks…

Chris Farmer
- 24,974
- 34
- 121
- 164
26
votes
5 answers
Ag-Grid cellRender with Button Click
I am using an angular 5 with ag-grid data table
i cant able to trigger a click event from cell using cellRenderer here how am using my ag-grid --> colDefs
this.columnDefs = [
{headerName: '#', rowDrag: true, width: 75},
…

YuvaMac
- 419
- 1
- 6
- 13
21
votes
10 answers
How to format data before displaying it on ag-grid
I've just discovered ag-grid. I'm using it on angular2+ and loading data from api. One of fields is date, but its in ISO format. I've been trying to format it, is there any way to do it, is it possible to add pipe or some other way? Usually i do it…

Kerim092
- 1,367
- 1
- 12
- 32
20
votes
5 answers
How to create tooltip on ag-grid row?
I want to display a tooltip conditionally based on status field, on hovering over an entire row(not on just cells). In the API documentation, I found this: https://www.ag-grid.com/javascript-grid-column-properties/
tooltip A callback that takes…

Sandeep Kumar
- 2,397
- 5
- 30
- 37
20
votes
2 answers
Ag grid Server side pagination
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…

Steeve
- 266
- 1
- 2
- 10
19
votes
6 answers
Deselect selected rows from ag grid angular
Is there any grid api to deselect ag-grid selected rows programatically?
I'm trying to perform some operation on the selected row, basically an async operation , after which I need to deselect this row from the grid .

Riya
- 794
- 2
- 9
- 17
17
votes
5 answers
how to pre-set column filter in ag-grid
I have an Ionic/Angular app using ag-grid. I would like certain grids to have a filter automatically applied when the grid is loaded - without the user having to do anything.
I tried the following:
onGridReady(params) {
…

user2429448
- 541
- 1
- 5
- 14
13
votes
2 answers
Issues Customizing the Ag-Grid Themes
How do I go about customizing the Ag-Grid themes (eg. ag-theme-material.css) in an existing Angular App?
The documentation they have provided is lacking, as it doesn't explain how to perform these changes/configurations.
Any help would greatly be…

Andrew Lobban
- 2,065
- 2
- 24
- 38
12
votes
1 answer
Export data to CSV in server pagination / sorting / filtering mode
I am trying to export the ag-grid data to CSV.
The issue is, it exports only the visible data OR the in-memory data received from HTTP call while considering paginationPageSize, maxBlocksInCache, cacheBlockSize etc. in the grid. Not the entire…

Paritosh
- 11,144
- 5
- 56
- 74
11
votes
5 answers
Warning 'grid zero width' when using ag-Grid's sizeColumnsToFit() on two separate ag-Grids, displayed by a tab menu
Getting the warning below when resizing ag-Grid (change size of browser window) and switching between two tabs:
ag-Grid: tried to call sizeColumnsToFit() but the grid is coming back
with zero width, maybe the grid is not visible yet on the…

Rune Hansen
- 954
- 3
- 16
- 36
11
votes
2 answers
With AG Grid, prevent row click event when cell is clicked?
I'd like to stop event propagation on all cell clicks since I'm using onRowClicked to do some actions. When a user clicks on something inside a cell (like an input field), I don't want the row click to be triggered.
Any thoughts?
I'm using Angular…

Charlie
- 1,646
- 5
- 22
- 40
10
votes
1 answer
Ag-grid tooltip above ellipsis text only
I'm using the enterprise ag-Grid version in my project.
I found tooltip supporting under the box and make as follows:
columnDefs = [
{
headerName: 'USER NAME',
field: 'userName',
sortingOrder: ['asc', 'desc'],
filter:…

user3818229
- 1,537
- 2
- 21
- 46
9
votes
3 answers
How do I specify the RowNode.id in ag-grid
I'm posting this here because this wasted a fair bit of my time today.
I was trying to set the RowNode.id from the data in the objects I set aggrid's rowData property to. meaning, I wanted to use a property on my data model to supply the built in…

Jason Wall
- 571
- 1
- 6
- 15
9
votes
2 answers
AG-Grid - How to insert a line break into my cell data
I'm new to AG-Grid, so forgive me if this is a dumb question. We're using the OSS version of Ag-Grid in an Angular 5 application. I have a column where I am combining two sets of summary data and showing them. I would like to have a line-break…

James Bender
- 1,175
- 1
- 11
- 22
9
votes
6 answers
ag grid sizeColumnsToFit for columns not working
I have used ag-grid ng2 and trying to apply sizeColumnsToFit.
For example: If there are 4 columns then it should be automatically resized and fit to the width of grid.
gridOptions.api.sizeColumnsToFit() not working.
var gridOptions = {
…

Poonam Thote
- 367
- 3
- 5
- 12