ag-grid

How do I change my checkbox colours on the following page?

感情迁移 提交于 2019-12-11 08:39:05
问题 I'm trying to adapt some code from the following page: https://plnkr.co/edit/plSzOtlpPXFguBIY1JwB?p=preview When I click 'Column', the checkboxes are pink. The style seems controlled as follows: <style> html, body { margin: 0; padding: 0; height: 100%; } </style> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto"/> <script src="https://unpkg.com/ag-grid-enterprise@18.1.1/dist/ag-grid-enterprise.min.js"></script></head> <body> <div id="myGrid" style="height: 100%;"

AG Grid - Suppress row selection inside a particular column/cell

放肆的年华 提交于 2019-12-11 07:58:07
问题 Using AG Grid, i need to make a table with row selection on click, but where clicking on certain cells will NOT cause the row to be selected. The best idea I've had so far is to disable on-click row selection when the mouse hovers over the non-selecting cell. Something like: gridOptions.onCellMouseOver = (event) => { if (/*cell is from non-select column*/ ) this.gridOptions.suppressRowClickSelection = true; } gridOptions.onCellMouseOut = (event) => { if (/*cell is from non-select column*/ )

Scoping issues while using context menu

怎甘沉沦 提交于 2019-12-11 07:13:54
问题 I'm following the docs here to add a context menu item to my grid. The issue is that from the scope of getContextMenuItems (in the example), I'm unable to access any other methods or variables in my component. Is this possible? Example below: private varIWantToAccess: boolean = false; function getContextMenuItems(params) { var result = [ { // custom item name: 'Alert ' + params.value, action: function () { window.alert('Alerting about ' + params.value); this.varIWantToAccess = true; // Builds

Ag-Grid and disabling a button

喜夏-厌秋 提交于 2019-12-11 07:05:02
问题 I want to disable a button as long as any row is not selected in my ag-grid. When a row is selected I want to activate a button. Here my code: app.component.html <button disabled="activeButtons">Disable me</button> <!--option 1--> <button ng-disabled="activeButtons()">Disable me</button> <!--option 2--> <ag-grid-angular #agGrid style="width: 500px; height: 500px;" class="ag-theme-balham" [enableSorting]="true" [enableFilter]="true" [rowData]="rowData | async" [columnDefs]="columnDefs"

Ag-grid viewport: cannot read property 'bind' of undefined

陌路散爱 提交于 2019-12-11 06:33:29
问题 I'm replicating the ag-grid Viewport example putting it in an object representing the table instead of a anonymous function. I cannot understand why it gives me the error in the title when trying to connect to the mockserver, given that it is exactly the same code. Here it is the code that doesn't seem to work: function ViewportDatasource(mockServer) { this.mockServer = mockServer; this.connectionId = this.mockServer.connect(this.eventListener.bind(this)); } ViewportDatasource.prototype

Ag-grid full width rows does not appear to work with React Components

我只是一个虾纸丫 提交于 2019-12-11 06:23:29
问题 I am not sure if I am doing something wrong here or if the documentation is wrong or misleading. I am trying to use the FullWidthRowCell feature for detail panels for each row. However, it appears not to completely work as documented. As I recently made the jump from v4 to v6 of ag-grid, I thought I would ask here if I was in error before making a bug report of this. Description: I changed an existing data grid so that I would potentially have a details panel that expands out to show

CSS classes not picked up during Angular 5 compilation

核能气质少年 提交于 2019-12-11 05:46:28
问题 I'm using ag-grid in my angular 5 project. I'm trying to add css classes to the cells. Having looked the extensive documentation on ag-grid cell style I have tried to use cellClass and cellClassRules. The styles are defined in the scss file, as an example: .readonly-cell{ background-color: #cccccc; } The scss file is then included in the component: @Component({ selector: 'app-volume', templateUrl: './volume.component.html', styleUrls: ['./volume.component.scss'] }) I then apply the class to

How to use ag-grid in a Nuxt app

主宰稳场 提交于 2019-12-11 05:24:47
问题 I'm building a Nuxt application and I'm trying to render an ag-grid in one of my pages I created a plugin called ag-grid.js : import * as agGridEnterpise from 'ag-grid-enterprise/main' agGridEnterpise.LicenseManager.setLicenseKey([MY_LICENSE_KEY]) On nuxt.config.js i have registered the plugin: plugins: [ //... { src: '~/plugins/ag-grid.js', ssr: false } ], And in my page component i have: <template> <ag-grid-vue ref="table" class="ag-theme-material" :pinnedTopRowData="pinnedRow ? [pinnedRow]

how to add conditional template on ag-grid

寵の児 提交于 2019-12-11 04:23:08
问题 can I do a conditional template on the first column below? for example: If my row has score property and I want to hide the input when my score is above 70? let columns = [ { width: 30, suppressSorting: true, suppressMenu: true, template: '<input type="checkbox">' }, { headerName: "Score", filter: 'number', valueGetter: (params : any) => params.data.traces ? (<Alert> params.data.traces[0]).severity : params.data.severity, width:70}, { headerName: "Behaviour tags" }, { headerName: "Host",

Ag-grid angular format data before exporting

折月煮酒 提交于 2019-12-11 02:29:21
问题 I have grid which I want to export: initializeColumnDefs() { this.columnDefs = []; this.columnDefs.push({ headerName: 'time, field: 'completedTimestamp', cellRenderer: (params: any) => { if (params.data.isMomentarily) return ''; return DatagridComponent.DefaultDatetimeCellRenderer(params); }, comparator: (valueA: number, valueB: number) => { return DatagridComponent.DefaultDatetimeCellComparator(valueA, valueB); } }, { headerName: 'people', field: 'people', cellRenderer: (params: any) => { if