Auto Size all columns to fit content

Grid Resizing: https://www.ag-grid.com/javascript-grid-resizing/ sizeColumnsToFit – this tries to squeeze all the columns in the view – no horizontal scrolling autoSizeAllColumns – this tries to size all columns to to fit the data – horizontal scrolling // If you need to resize specific columns var allColIds = params.columnApi.getAllColumns() .map(column => column.colId); params.columnApi.autoSizeColumns(allColIds); // If you want … Read more

Ag-Grid Link with link in the cell

Please check this demo cellRenderer: function(params) { return ‘<a href=”https://www.google.com” target=”_blank” rel=”noopener”>’+ params.value+'</a>’ } In this demo, the cell value for the column ‘city’ is a hyperlink.

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

You should use the cellRenderer property const columnDefs = [{ headerName: ‘Refunded’, field: ‘refunded’, editable:true, cellRenderer: params => { return `<input type=”checkbox” ${params.value ? ‘checked’ : ”} />`; } }]; I was stuck in the same problem , this is the best I could come up with but I wasn’t able to bind the value … Read more

tech