ag-grid

ag-grid gridOptions.api undefined in angular 2

非 Y 不嫁゛ 提交于 2019-12-09 00:32:20
问题 I am trying ag-grid in angular2 with typescript, for some reasons I am not able to use the ag-grid APIs, getting undefined error., here is the code.., import { AgRendererComponent } from 'ag-grid-ng2/main'; import { GridOptions, RowNode } from 'ag-grid/main'; import { GridOptionsWrapper } from 'ag-grid/main'; import { GridApi } from 'ag-grid/main'; public gridOptions: GridOptions; constructor() { this.gridOptions = <GridOptions>{}; alert(this.gridOptions); alert(this.gridOptions.api); // ***

Ag-Grid expand row

£可爱£侵袭症+ 提交于 2019-12-08 17:41:58
问题 Im using Ag-grid to control my table, but i want in my group that stores a list of rows instead of having to make the row group expand in 2 clicks, i want to be on 1 click. If i click on the icon arrow it works, but if i click on the title row it only opens on 2 clicks. I already tried to find in the documentation any information about it, but cant find nothing. Here is a example from the documentation. https://ag-grid.com/javascript-grid-tree/index.php example image: 回答1: You can listen to

Programmatically select a row ag-grid + angular 2

前提是你 提交于 2019-12-08 17:33:51
问题 Trying to select first row by default in ag-grid. As per ag-grid documents, I should be able to do this using NodeSelection Api(https://www.ag-grid.com/javascript-grid-selection/?framework=all#gsc.tab=0). But I am not able to get to node object at all. HTML file <div class="pulldown panel panel-default"> <div class="panel-heading">{{rulesSummaryTitle}}</div> <ag-grid-angular #agGrid class="ag-fresh ag-bootstrap" [gridOptions]="gridOptions" [rowData]="rowData" [columnDefs]="columnDefs"

How to add custom column dynamically in ag-grid

痴心易碎 提交于 2019-12-08 16:35:38
问题 I'm stacked to add Custom columns dynamically in ag-grid. I have tried following approach. additionalCol = { field:'SOME RANDOM', headerName: 'SOME RANDOM' }; $scope.gridOptions.columnApi.addValueColumn(additionalCol); I have also tried $scope.columns.push(additionalCol); $scope.gridOptions.api.refreshView(); but didn't get success. I even tried to add columns that exist in Data but failed. Below is Image for what I am trying. As shown in image "% dev" is Custom column which I need to add

Ag-Grid - Row with multiline text

為{幸葍}努か 提交于 2019-12-08 15:16:47
问题 I'm using Angular Grid (version 1.16.1) and I need to show a long text inside a table and I want that row height would be adjusted by the content, breaking line if necessary. I've tried: sizeColumnsToFit method, expecting that ag-grid could resize column by its content; setRowStyle method at gridOptions: I've added CSS classes to adjust roe height by the content (e.g: 'word-wrap':'break-word'); minWidth and width: I've calculated the average column size but ag-grid didn't respect it;

How to transfer rows between two different Grids (Ag-grid Angular 6) using Drag and Drop?

泪湿孤枕 提交于 2019-12-08 12:56:27
问题 I want to transfer rows between two grids, having same column definition, One grid will hold the "free devices" and the other grid will hold the "devices to be added" , Is there a solution for this using drag and drop to transfer rows between two grids or any other way. 回答1: This feature is in ag-grid-pipeline and planned for Next Release as of now. AG-1708: Row dragging: Allow dragging between grids or between the grid and a external element 来源: https://stackoverflow.com/questions/55685188

Ag-Grid Tree like structure attach cellClass to NodeChildren cells based on validation

跟風遠走 提交于 2019-12-08 12:27:09
问题 In my Jquery&JavaScript, Angular, all seperate applications i have included Ag-Grid with columnDefs like below :- this.columnDefs = [ { headerName: "Age", field: "age", cellRenderer: "agGroupCellRenderer" }, { headerName: "Name", field: "name" }, { headerName: "Year", field: "year" }, { headerName: "Country", field: "country" } ]; and my row Data is like below this.rowData = [ { age: "Group A", participants: [ { age: 1, name: "Michael Phelps", year: "2008", country: "United States" }, { name:

angular2 ag-grid-ng2 how to embed (default/custom) filter input in header cell

无人久伴 提交于 2019-12-08 12:24:59
问题 I trying to create custom header cells for my grid and would like to embed input type for filtering right into the header cell instead of clicking the menu button. Is it possible to move filter and other fields from under menu section into the header cell? 回答1: The issue is solved. Actually, with the latest update of the ag-grid to the version 8 as well as the update of the ag-grid-ng2 modules, it is possible to specify the header cells via the custom components. Any custom filters can be

AG-Grid: Make editable columns based on response from server

走远了吗. 提交于 2019-12-08 04:34:38
问题 I need some help for work. The story goes like this: I need to make the "Date" Column editable if Item-Id !== null; We have a "view" where we have an inbox created with AG-Grid. The inbox looks like this: ---| Item-Id | Date | Justification |--- ---------------------------------------- ---| |24.05 | text |--- ---------------------------------------- ---| 31 |25.05 | text 2 |--- ---------------------------------------- ---| 31 |25.05 | text 2 |--- ---------------------------------------- ---|

No component factory found. Did you add it to @NgModule.entryComponents?

风格不统一 提交于 2019-12-07 05:34:45
问题 While using ag-grid with angular4, I'm stuck with below error message. I'm trying to display row data after fetch json via HTTP. this.gridOptions.api.setRowData(this.gridOptions.rowData); But my code made below error message. ERROR Error: No component factory found for RedComponentComponent. Did you add it to @NgModule.entryComponents? This is my app module code. I'd already set to entryComponents. import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular