ag-grid

Ag grid master detail - Cannot handle click or any events in template string given to detail grid

送分小仙女□ 提交于 2020-04-30 09:17:06
问题 https://plnkr.co/edit/N8uz5UccTS0yYxeG. There is Add row button inside detail grid. which is not working as its a string and its not compiled version. In UI grid, it has context like $scope.grid.appscope.eventhandler ref. In a similar way is there anything in ag grid? If not, How to compile that string using compiler in angular 7 or any other way for it? 来源: https://stackoverflow.com/questions/61290016/ag-grid-master-detail-cannot-handle-click-or-any-events-in-template-string-giv

AngularJs : using ag-grid's $scope.grid.api.setRowData() does not work

蹲街弑〆低调 提交于 2020-04-30 07:10:27
问题 So, I forked this simple ag-grid demo Plunker and the forked version is here. The only change is that the old code statically assigned the row data for the ag-grid while my fork tries to assign i dynamically, using the API. i old: var rowData = [ {make: "Toyota", model: "Celica", price: 35000}, {make: "Ford", model: "Mondeo", price: 32000}, {make: "Porsche", model: "Boxter", price: 72000} ]; // let the grid know which columns and what data to use var gridOptions = { columnDefs: columnDefs,

How to adjust datepicker view inside ag grid cell render template?

我的未来我决定 提交于 2020-04-17 20:37:47
问题 I use cell rendering in my ag-grid for editing a date field.Inside that cell datePicker is added as shown view of my cell But when i am clicking the date icon date picker view is like it is fully mounded inside the cell and not visible properly.the below picture shows my issue @Component({ selector: 'app-gender-renderer', template: ` ` <input type="text" id="recording_date_to" [(ngModel)]="changedRecDateTo" (change)="edit()" ngbDatepicker #d="ngbDatepicker" style="z-index: 0;" class="form

ag-Grid row not deleting

感情迁移 提交于 2020-04-07 03:29:19
问题 I am trying to delete a row from my ag-Grid like so: let alertRow : RowNode = this.gridApi.getRowNode(rowIndex); console.log(alertRow); this.gridApi.updateRowData({remove: [alertRow]}); It gives me this error: ag-Grid: could not find data item as object was not found I can see in console the RowNode is the correct node and exists. I am also able to use updateRowData() to add new rows in fine but trying to remove gives this error. I am using ag-Grid in Angular 6 component. Why is removing not

Dynamically adding and deleting row in empty ag-grid,first time row is getting deleted, second time throwing error

扶醉桌前 提交于 2020-03-25 13:57:29
问题 Initially i am displaying empty grid with header names. on click of add button new empty row should be added with delete icon.I am able to dynamically add row ag-grid.First time if i delete row after adding, its getting deleted, but second time its giving me below error.. Second time, its giving me error. Uncaught TypeError: Cannot read property 'data' of undefined Method getting calling on adding row:- createNewRowData() { let newData = { tableName: '', schemaName: '', columnName: '',

Cannot read property 'setRowData' of undefined

那年仲夏 提交于 2020-03-16 07:41:12
问题 I am trying to get new data on my ag grid. I tried using this.gridOptions.api.setRowData(rowdata); but it throws this error Cannot read property 'setRowData' of undefined I have kept this method in the onGridReady method at the onInit method. Not sure if that helps, but I am using cellRenderer also. Does this method work for anyone else? Is there anything specific to call this method? 回答1: The gridReady event has the api as a parameter. Try event.api.setRowData(), or set the row data using

Remove Focus from AgGrid when click outside the ag-grid

偶尔善良 提交于 2020-03-05 00:22:51
问题 I'm using AG Grid on a website. When the user clicks a cell, it is focused and gets a blue outline. I need to remove this focus when the user clicks outside the selected element. const body = document.body; body.addEventListener('mouseup', (e) => { const container = this.commonAgGrid.nativeElement; if (!container.contains(e.target)) { this.gridApi.clearFocusedCell(); } }); But this is not working when I am using mat select component in ag-grid. Example- plunker Please change the dropdown

Can't Get Json to display in ag Grid just says loading

筅森魡賤 提交于 2020-02-27 22:20:41
问题 Using various example I have found on the web I pieced together a simple web app. However although AG Grid (the grid I have chosen to display the data works with the data source provided, it does not work with my own data source which was created using a web service written in Go. Angular code... ngOnInit() { this.rowData = this.http.get('https://api.myjson.com/bins/ly7d1'); } This works correctly showing the data on the grid. but when i redirect it to me Go generated data using the following

Updating 'autoGroupColumnDef' object doesn't update the table

萝らか妹 提交于 2020-01-25 12:45:06
问题 I'm passing a state object in 'autoGroupColumnDef' property of ag grid. On a switch, I need to update it's value. Using setState is not helping in this case. let temp = {...this.state.autoGroupColumnDef} temp.field = "sport" this.setState({ autoGroupColumnDef : temp }) <AgGridReact columnDefs={this.state.columnDefs} defaultColDef={this.state.defaultColDef} animateRows={true} enableRangeSelection={true} rowData={this.state.rowData} autoGroupColumnDef={this.state.autoGroupColumnDef} onGridReady

Ag-grid angular copy menu option not available

泪湿孤枕 提交于 2020-01-25 10:13:11
问题 I am using ag-grid with angular 8 with an enterprise license. For some reason, the default "copy", "copy with headers" context menu items are not available. Only the "Export" item is showing up. Other enterprise features are working fine, but I can't seem to figure out how to enable "copy". I'm not sure what I can try next, I've tried using different imports, disabling features, ... The ag-grid-angular tag: <ag-grid-angular #agGrid style="width: 800px; height: 500px;" class="ag-theme-balham"