ag-grid

How to show and use radio button on ag-grid?

∥☆過路亽.° 提交于 2019-12-04 06:57:29
问题 I am learning ag-grid and tried following code to show checkbox in my application. In app.component.html: <ag-grid-angular style:"width: 500px; height: 500px;" class: "ag-theme-balham" [rowData]="rowData" [columnDefs]="columnDefs" rowSelection="multiple" [gridOptions]="gridOptions" [gridReady]="onGridReady($event)"> </ag-grid-angular> In AppComponent.ts: export class AppComponent implements OnInit { @ViewChild('agGrid') agGrid: AgGridNg2; private gridApi; private gridColumnApi; gridOptions:

Angular Ag Grid Single Click Issue with IE 11

 ̄綄美尐妖づ 提交于 2019-12-04 06:04:23
问题 I am using Ag Grid enterprise version 17.0 with Angular 5. I have enabled single click edit option. It works perfectly in Chrome on single click but it is not working in IE 11. I have to click multiple times to get the cell in edit mode. Can anyone please help me to fix the issue ? Please find the below code which I am using for custom input texts. I have manually added click and dblclick events for it work in IE 11. this.gridOptions.suppressClickEdit = false; this.gridOptions.singleClickEdit

ag-grid and angular, how to switch grid options dynamically

99封情书 提交于 2019-12-04 05:20:03
问题 I have two different grid configurations (represented as two gridOption objects). One is loading local data, where the other one is using an elasticsearch datasource with the infinite row model. If I wire them in the template [gridOptions]="localOptions" , [gridOptions]="elasticGridOptions" both work perfectly well. This is my current component and (schematically) what I want to achieve: @Component({ selector: 'app-gridtest', styleUrls: ['./gridtest.component.css'], template: ` <ag-grid

Ag-grid Angular How to get click events on Header?

本秂侑毒 提交于 2019-12-04 04:06:59
问题 Is there any way to get notified of click events on ag-grid's header in Angular? The <ag-grid-angular> -Component offers multiple events for clicks on cells (e.g. cellDoubleClicked ). Those don't get triggered for header clicks and I was unable to find any events specific for header clicks. This question was already asked by someone else in the past and not answered, so I don't think, there's any built in way. Why do I need this? I'm working with another library to supply context menus for

How to upgrade/refresh the ag-grid after row delete?

爱⌒轻易说出口 提交于 2019-12-04 00:26:12
I have an ag grid where i am trying to delete a row...I am able to remove the row from data source using "splice" technique,after that i want to refresh the table.But it is showing error.This is the code which i am using to delete a row selectedvalue={} //this holds the selected row value rowData=[]; //this holds all the row data onRowSelected(event) { this.selectedvalue = event; } deletebtn() { for (let i = 0; i < this.rowData.length; i++) { if (this.selectedvalue.node.data.make === this.rowData[i].make) { this.rowData.splice(i, 1); this.gridOptions.api.refreshView(); } } } It is showing

Ag grid Server side pagination

一个人想着一个人 提交于 2019-12-03 20:52:31
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 the Grid. Any good examples on how to do that? Thanks in advance. After digging ag-grid Library for the whole day , I finally found the solution. First Lets include the following options in our GridOptions; GridOptions : gridOptions: GridOptions = { pagination: true, rowModelType: 'infinite', cacheBlockSize: 20, // you can have your custom page

Angular Grid ag-grid columnDefs Dynamically change

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 retrive data from server: $scope.customColumns = []; $http.post('/Home/GetProducts', { tableName: 'TABLE_PRODUCT' }).success(function (data) { angular.forEach(data.Columns, function (c) { $scope.customColumns.push( { headerName: c.Name, field: c.Value, width: c.Width } ); }); $scope.gridOptions.columnDefs = $scope.customColumns;

How to Init CellEditor Dynamically with the result of a REST call

橙三吉。 提交于 2019-12-03 00:04:56
问题 I'm working on an app that uses Angular and Ag-Grid. I have a column defined like following: columnDefs = [ ... { headerName: 'LANG', field:'lang', autoHeight: true,cellClass: 'cell-wrap-text',sortable: false, filter: true, editable: true, cellEditor : 'agSelectCellEditor', cellEditorParams : ['English', 'Spanish', 'French', 'Portuguese', '(other)']; }, ... ]; So everything works fine and in edit mode, I get the Combobox with the different options ('English', 'Spanish', 'French', 'Portuguese'

Angular: AgGrid will not update rows when subscribing to Observable

你说的曾经没有我的故事 提交于 2019-12-02 22:47:38
问题 I am trying to incorporate rxjs and observables into ag grid. For practice, I am following an official ag grid example: https://www.ag-grid.com/javascript-grid-rxjs/ I am currently using Angular 6. I changed the js file to be a ts file and made the appropriate changes. I also do not include any scripts in my index file. I was getting a bunch of MIME errors anytime I called a script. So I converted to code to strictly angular. I believe this is what is causing my issue. My goal is to have

ag-grid vs slick-grid vs angular-grid which is better? [closed]

烈酒焚心 提交于 2019-12-02 15:37:21
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 control over it. It would be a great if any one can help us out on choosing right grid with angularjs . Niall Crosby Disclosure: I'm the founder and CEO of ag-Grid. First, some clarification on the question, ag-Grid used to be called angular-grid, however I presume you meant angular-ui-grid (or simply ui-grid), so allow me to answer ag-grid vs slick-grid