Questions tagged [ag-grid]

AG Grid is a client-side and server-side JavaScript grid which is designed to be framework agnostic. It is not dependent on any framework, allowing it to be easily integrated with any of them. Use this tag for questions related to problems with the configuration of AG Grid and its integration with other tools.

AG Grid is a client-side grid that is designed to be framework agnostic. It is not dependent on any framework allowing it to be easily integrated with any of them.

When posting, describe the problem, add some screenshots/code samples.

Don't forget to specify if you integrate it with frameworks like Angular v1, Angular v2, or other frameworks or if you're using it with native JavaScript or TypeScript.

Documentation and forum can be found on the site: http://www.ag-grid.com

Github repository: https://github.com/ag-grid/ag-grid

Related tags:

4815 questions
47
votes
10 answers

How to hide column in AG-Grid?

How to hide the column in AG-Grid and also it should not be displayed in Tool Panel... var columnDefs = [{ headerName: "Stone_ID", field: "Stone_ID", width: 100, hide: "true" }]
nkota
  • 555
  • 1
  • 6
  • 15
44
votes
21 answers

How to use a checkbox for a boolean data with ag-grid

I have searched for awhile now and haven't seen any real example of this. I am using ag-grid-react and I would like for a column that holds a boolean to represent that boolean with a checkbox and update the object in the rowData when changed. I…
Brett
  • 363
  • 1
  • 4
  • 11
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
37
votes
8 answers

How can I get all the rows of ag-grid?

ag-grid provides a way to get selected rows using api.getSelectedRows() function. And provides a way to set all rows using api.setRowData([]) function. I'm looking for something getAllRows() to return all the rows in the grid. I know there is a way…
Sandeep Kumar
  • 2,397
  • 5
  • 30
  • 37
35
votes
14 answers

How can I center the text in the headers for an AG-grid control?

How can I center the text in the headers for an AG-grid control? I have tried using cellstyle and cellclass in the column definition but that did not work. Thank you
user7400346
  • 799
  • 1
  • 8
  • 15
33
votes
3 answers

ag-grid vs slick-grid vs angular-grid which is better?

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…
Sumit Khanduri
  • 3,619
  • 7
  • 30
  • 40
31
votes
9 answers

Ag-Grid Link with link in the cell

I am building angular 4 app with ag-grid and I am having an issue with trying to figure out how to put a link in the cell. Can anybody help me with that issue? Thanks
Tom Brzeski
  • 501
  • 1
  • 5
  • 9
31
votes
10 answers

how to wordwrap a header in ag-grid

Using ag-grid, is there a way to split a long header across 2 rows... A break in the columnDefs headerName: 'Long
Header' gets me part way there (using dev tools I can see the text has the br), however one of the surrounding elements has a…
pete r
  • 311
  • 1
  • 3
  • 4
28
votes
3 answers

Angular Grid ag-grid columnDefs Dynamically change

I have a problem about columnDefs change dynamically. Here is my gridOptions: $scope.gridOptions = { columnDefs: [], enableFilter: true, rowData: null, rowSelection: 'multiple', rowDeselection: true }; And when I retrieve data from…
Vaso Beruashvili
  • 678
  • 2
  • 7
  • 14
27
votes
7 answers

How do I get and set ag-grid state?

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…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
26
votes
6 answers

Auto Size all columns to fit content

All my searches turned up for sizeColumnsToFit and autoSizeColumns which is not what I want. My grids have many columns, so it scroll horizontal which is fine But I cannot know in advance what would be the most space needed for the widest text in a…
Nico
  • 139
  • 3
  • 6
  • 23
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
26
votes
8 answers

How to provide a background color for an entire row in ag grid based on a certain value in a column?

I need to provide a background color for an entire row in ag grid based on a condition in a column. I found no such examples where entire row is colored based on a certain value in a column..
Akshay
  • 273
  • 1
  • 3
  • 6
25
votes
8 answers

unnecessary horizontal scroll bar coming inspite of using sizeColumnsToFit in ag-grid

I have upgraded my ag-grid version from 7.2.0 to v14.2.0. When I use sizeColumnsToFit() api with onGridReady or onGridSizeChanged event, it works but it keeps unnecessary horizontal scroll, may be due to wrong calculation of grid width. This…
undefined
  • 3,464
  • 11
  • 48
  • 90
22
votes
7 answers

Is there a way to specify ag-grid column width in percentage?

Right now, the only way I see to specify column grid width is to add a width property to column definition like: columnDefs: any[] = [ { headerName: 'ID', field: 'id', width: 50, type: 'numericColumn' } ]; But as we can see in…
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
1
2 3
99 100