Search Posts

Category: ag-grid

Ag-grid-enterprise Aggregate two columns

I am using ag-grid, in aggregate function for Lead To enquiry Ratio , i want the below calculation (total lead * total enquiry / 100) ie. aggregation of data from other columns. I tried using cellRenderer but it did not work. Please help me how to go about it. Below is my column code : var columnDefs = [ {headerName: “Zone”, field: “zone”,cellRenderer: ‘group’, enableRowGroup: true, enablePivot: true,rowGroupIndex: 0,hide:true}, {headerName: “Lead”, field: “lead”,aggFunc: sumFunction, showOriginal:true,cellStyle: […]

AngularJS – Override CSS

I’ve inherited an AngularJS project which uses the 3rd party grid, Ag-grid. There is an ag-grid-style.css file that has the following: .ag-pinned-left-header.hasCategoryCol .ag-header-cell, .ag-pinned-left-cols-viewport.hasCategoryCol .ag-row .ag-cell { width: calc(100% / 7) !important; } This works great for the grid already in use, the grid is nicely divided into 7 columns. My problem is I have created new code, also using ag-grid, but I need the new grid divided into 6 columns, not 7. I end […]

Angular 2 ag-grid’s Clear Filter button clears the textbox without refreshing column when built-in filter is used

When ag-grid’s default filter is enabled, the clear filter button only clears the text box and doesn’t refresh the column even though ‘clearButton’ and ‘applyButton’ params are set to true. After clicking the Clear filter button the text gets cleared from the textbox and I have to actually click Apply Filter button to remove the filter and refresh the column. Below is my code: result.filter = “date”; result.filterParams = { applyButton: true, clearButton: true }; […]

button click should display data in <div> using cellRenderer in ag-grid

I have ag-grid table. I am replacing ‘Bookingxml’ column data with button. When that button is clicked, it should show the data of that particular cell in ‘out’ div. I went through the documentation and figured, cellRenderer is the way to do it. I tried below code, but that didn’t work. var gridOptions = { columnDefs: [ {headerName: ‘Booking Type’, field: ‘BookingType’, width: 200}, {headerName: ‘Booking Error’, field: ‘BookingError’, width: 150 }, {headerName: ‘Booking Date’, […]

"__agComponent" (CellComp) missing in eGridCell after update to 13.1.0

I updated ag-grid from 12.0.2 to 13.1.0, now one of my custom renderers doesn’t work because __agComponent from type CellComp in the attribute eGridCell is missing. Reverted back to 12.0.2 and everything was back to normal. The project uses AngularJS but the renderers are plain JavaScript. You can see the difference in the return params of CellComp.prototype.createRendererAndRefreshParams in ag-grid.js Is this an intentional change or an bug? Where would I find the old functionality? Source: […]