angular-grid

How to call a service from ag grid drag & drop event

我与影子孤独终老i 提交于 2021-01-29 19:12:52
问题 I have an ag-grid set up with options to trigger drag and drop events: this.gridOptions = { columnDefs: this.getColumnDefs(), rowDragManaged: true, onRowDragEnter: this.onRowDragEnter, onRowDragEnd: this.onRowDragEnd, ... I also have a simple service export class myService { ... public doSomething(): void { ... } } It seems I cannot call the doSomething service function from within the onRowDragEnd event - getting a cannot read property 'doSomething' of undefined... at Object.onRowDragEnd

Selecting group level row on selecting all event on ui-grid

大城市里の小女人 提交于 2019-12-25 04:33:24
问题 I am trying to react on event when user clicks on select all event on header of ui-grid. All rows do get selected, which is expected behavior, but high level group rows are not selected which in my opinion is counter-intuitive for a user. You can see example here: http://embed.plnkr.co/rUsK0LfGF3ws8vhsc9sR/ I know that triggered event is: gridApi.selection.on.rowSelectionChangedBatch($scope,function(rows){ // do something }); But when I iterate through rows passed to function I don't see the

Align gridster items using row and col values angularjs

六月ゝ 毕业季﹏ 提交于 2019-12-25 02:44:20
问题 I have created a dashboard using angularjs, kendoui charts and angular gridster (https://github.com/ManifestWebDesign/angular-gridster). So I have a function to add a gridster with chart like below :- // add widget to a dashboard $scope.addWidget = function () { // new widget configuration var newWidget = { id: $scope.allWidgetData.selectedOption.id, data_source: {}, config: { name: $scope.allWidgetData.selectedOption.name, sizeX: 3, sizeY: 2, row: $scope.row, col: $scope.col } }; } // make

Wrap ag-grid in an Angular Directive

只愿长相守 提交于 2019-12-24 14:00:07
问题 I am creating a wizard to add a new appointment in our application. The last page of the wizard contains a tabbed section with all potential conflicts based on several criteria. Each tab is one of the criteria and uses an Angular Grid to show the list of conflicts. Since each grid has the same columns, but contains different data, I would like to use a directive to wrap the Angular Grid and its grid options in the Template and then set the rowData in another attribute on my directive. I

How to hide ag-grid if rowData is null?

好久不见. 提交于 2019-12-23 04:09:29
问题 I have a use case where the ag-grid (Angular Grid) I am using must not appear at all if the rowData is null that is returned from the Model code. As of now I am unable to find a way to do it at the grid level. What would be the right way to implement this? If hiding the div element is the way to do it, how does one doit in aright way from JavaScript? 回答1: If you want to hide the grid if no rows, then use an ng-if or an ng-show, pointing to the gridOptions.data. <div ng-grid="gridOptions" ng

Create tree in angular-grid (ag-grid) with async data loading

怎甘沉沦 提交于 2019-12-22 05:58:23
问题 I am trying to use angular-grid (ag-grid) to display a tree like in the example provided in the documentation: http://www.angulargrid.com/example-file-browser/index.php In the given example, all the data is already provided. How do I use async data loading when a row group is expanded? My guess is that i need to write my own group row renderer. 回答1: I came recently to the same problem in my React.js app and found solution. It's similar to what @leden posted but I found solution how to

Module 'angularGrid' is not available! with ag-grid and HotTowel

烂漫一生 提交于 2019-12-11 03:35:28
问题 I’m somewhat new to AngularJS and the HotTowel toolchain. The bower install of ag-grid places appropriate (.css & .js) links in the index.html file. The dependency to ‘angularGrid’ has been attempted against different modules (e.g. app, core, etc.) with no success. Code excerpts are included below. At runtime, this results in a string of errors: [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:modulerr] Failed to instantiate module app.core due to: Error: [

Create tree in angular-grid (ag-grid) with async data loading

感情迁移 提交于 2019-12-05 10:37:28
I am trying to use angular-grid (ag-grid) to display a tree like in the example provided in the documentation: http://www.angulargrid.com/example-file-browser/index.php In the given example, all the data is already provided. How do I use async data loading when a row group is expanded? My guess is that i need to write my own group row renderer. I came recently to the same problem in my React.js app and found solution. It's similar to what @leden posted but I found solution how to maintain current row expansions between table rows update. The solution is as follow: Add dummy child row for each