How to use the ag-grid-community.GridApi function in ag-grid-community

To help you get started, we’ve selected a few ag-grid-community examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ag-grid / ag-grid-enterprise / dist / lib / statusBar / providedPanels / filteredRowsComp.js View on Github external
var filteredRowCount = 0;
        this.gridApi.forEachNodeAfterFilter(function (node) {
            if (!node.group) {
                filteredRowCount += 1;
            }
        });
        return filteredRowCount;
    };
    FilteredRowsComp.prototype.init = function () { };
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], FilteredRowsComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], FilteredRowsComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], FilteredRowsComp.prototype, "postConstruct", null);
    return FilteredRowsComp;
}(nameValueComp_1.NameValueComp));
exports.FilteredRowsComp = FilteredRowsComp;
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / filters / toolPanelFilterComp.js View on Github external
ToolPanelFilterComp.prototype.onFilterOpened = function (event) {
        if (event.source !== 'COLUMN_MENU') {
            return;
        }
        if (event.column !== this.column) {
            return;
        }
        if (!this.expanded) {
            return;
        }
        this.doCollapse();
    };
    ToolPanelFilterComp.TEMPLATE = "<div class="\&quot;ag-filter-toolpanel-instance\&quot;">\n            <div class="\&quot;ag-filter-toolpanel-header">\n                <div></div>\n                <span class="\&quot;ag-header-cell-text\&quot;"></span>\n                <span aria-hidden="\&quot;true\&quot;" class="\&quot;ag-header-icon"></span>\n            </div>\n            <div class="\&quot;ag-filter-toolpanel-body">\n        </div>";
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], ToolPanelFilterComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('filterManager'),
        __metadata("design:type", ag_grid_community_1.FilterManager)
    ], ToolPanelFilterComp.prototype, "filterManager", void 0);
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], ToolPanelFilterComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", ag_grid_community_1.GridOptionsWrapper)
    ], ToolPanelFilterComp.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('columnController'),
        __metadata("design:type", ag_grid_community_1.ColumnController)</div>
github ag-grid / ag-grid-enterprise / dist / lib / menu / menuItemMapper.js View on Github external
checked: columnIsAlreadyAggValue && columnToUse.getAggFunc() === funcName
            });
        });
        return result;
    };
    __decorate([
        ag_grid_community_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", ag_grid_community_1.GridOptionsWrapper)
    ], MenuItemMapper.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('columnController'),
        __metadata("design:type", ag_grid_community_1.ColumnController)
    ], MenuItemMapper.prototype, "columnController", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], MenuItemMapper.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('clipboardService'),
        __metadata("design:type", clipboardService_1.ClipboardService)
    ], MenuItemMapper.prototype, "clipboardService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('aggFuncService'),
        __metadata("design:type", aggFuncService_1.AggFuncService)
    ], MenuItemMapper.prototype, "aggFuncService", void 0);
    __decorate([
        ag_grid_community_1.Optional('chartService'),
        __metadata("design:type", Object)
    ], MenuItemMapper.prototype, "chartService", void 0);
    MenuItemMapper = __decorate([
        ag_grid_community_1.Bean('menuItemMapper')
    ], MenuItemMapper);
github ag-grid / ag-grid-enterprise / dist / lib / statusBar / providedPanels / aggregationComp.js View on Github external
], AggregationComp.prototype, "cellNavigationService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('rowRenderer'),
        __metadata("design:type", ag_grid_community_1.RowRenderer)
    ], AggregationComp.prototype, "rowRenderer", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", ag_grid_community_1.GridOptionsWrapper)
    ], AggregationComp.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridOptions'),
        __metadata("design:type", Object)
    ], AggregationComp.prototype, "gridOptions", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], AggregationComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('cellPositionUtils'),
        __metadata("design:type", ag_grid_community_1.CellPositionUtils)
    ], AggregationComp.prototype, "cellPositionUtils", void 0);
    __decorate([
        ag_grid_community_1.Autowired('rowPositionUtils'),
        __metadata("design:type", ag_grid_community_1.RowPositionUtils)
    ], AggregationComp.prototype, "rowPositionUtils", void 0);
    __decorate([
        ag_grid_community_1.RefSelector('sumAggregationComp'),
        __metadata("design:type", nameValueComp_1.NameValueComp)
    ], AggregationComp.prototype, "sumAggregationComp", void 0);
    __decorate([
        ag_grid_community_1.RefSelector('countAggregationComp'),
        __metadata("design:type", nameValueComp_1.NameValueComp)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / dropZone / dropZoneColumnComp.js View on Github external
], DropZoneColumnComp.prototype, "aggFuncService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", ag_grid_community_1.GridOptionsWrapper)
    ], DropZoneColumnComp.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], DropZoneColumnComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('columnApi'),
        __metadata("design:type", ag_grid_community_1.ColumnApi)
    ], DropZoneColumnComp.prototype, "columnApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], DropZoneColumnComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.RefSelector('eText'),
        __metadata("design:type", HTMLElement)
    ], DropZoneColumnComp.prototype, "eText", void 0);
    __decorate([
        ag_grid_community_1.RefSelector('eDragHandle'),
        __metadata("design:type", HTMLElement)
    ], DropZoneColumnComp.prototype, "eDragHandle", void 0);
    __decorate([
        ag_grid_community_1.RefSelector('btRemove'),
        __metadata("design:type", HTMLElement)
    ], DropZoneColumnComp.prototype, "btRemove", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
github ag-grid / ag-grid-enterprise / dist / lib / rowModels / viewport / viewportRowModel.js View on Github external
], ViewportRowModel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], ViewportRowModel.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('selectionController'),
        __metadata("design:type", ag_grid_community_1.SelectionController)
    ], ViewportRowModel.prototype, "selectionController", void 0);
    __decorate([
        ag_grid_community_1.Autowired('context'),
        __metadata("design:type", ag_grid_community_1.Context)
    ], ViewportRowModel.prototype, "context", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], ViewportRowModel.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('columnApi'),
        __metadata("design:type", ag_grid_community_1.ColumnApi)
    ], ViewportRowModel.prototype, "columnApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('rowRenderer'),
        __metadata("design:type", ag_grid_community_1.RowRenderer)
    ], ViewportRowModel.prototype, "rowRenderer", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], ViewportRowModel.prototype, "init", null);
    __decorate([
github ag-grid / ag-grid-enterprise / dist / lib / statusBar / providedPanels / totalRowsComp.js View on Github external
this.setValue(this.getRowCountValue());
    };
    TotalRowsComp.prototype.getRowCountValue = function () {
        var totalRowCount = 0;
        this.gridApi.forEachLeafNode(function (node) { return totalRowCount += 1; });
        return "" + totalRowCount;
    };
    TotalRowsComp.prototype.init = function () {
    };
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], TotalRowsComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], TotalRowsComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], TotalRowsComp.prototype, "postConstruct", null);
    return TotalRowsComp;
}(nameValueComp_1.NameValueComp));
exports.TotalRowsComp = TotalRowsComp;
github ag-grid / ag-grid-enterprise / dist / lib / statusBar / providedPanels / selectedRowsComp.js View on Github external
return rowModelType === 'clientSide' || rowModelType === 'serverSide';
    };
    SelectedRowsComp.prototype.onRowSelectionChanged = function () {
        var selectedRowCount = this.gridApi.getSelectedRows().length;
        this.setValue(selectedRowCount);
        this.setDisplayed(selectedRowCount > 0);
    };
    SelectedRowsComp.prototype.init = function () {
    };
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], SelectedRowsComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], SelectedRowsComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], SelectedRowsComp.prototype, "postConstruct", null);
    return SelectedRowsComp;
}(nameValueComp_1.NameValueComp));
exports.SelectedRowsComp = SelectedRowsComp;
github ag-grid / ag-grid-enterprise / dist / lib / statusBar / providedPanels / totalAndFilteredRowsComp.js View on Github external
});
        return filteredRowCount;
    };
    TotalAndFilteredRowsComp.prototype.getTotalRowCount = function () {
        var totalRowCount = 0;
        this.gridApi.forEachNode(function (node) {
            if (!node.group) {
                totalRowCount++;
            }
        });
        return totalRowCount;
    };
    TotalAndFilteredRowsComp.prototype.init = function () { };
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], TotalAndFilteredRowsComp.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('eventService'),
        __metadata("design:type", ag_grid_community_1.EventService)
    ], TotalAndFilteredRowsComp.prototype, "eventService", void 0);
    __decorate([
        ag_grid_community_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], TotalAndFilteredRowsComp.prototype, "postConstruct", null);
    return TotalAndFilteredRowsComp;
}(nameValueComp_1.NameValueComp));
exports.TotalAndFilteredRowsComp = TotalAndFilteredRowsComp;
github ag-grid / ag-grid-enterprise / dist / lib / rangeController.js View on Github external
], RangeController.prototype, "columnController", void 0);
    __decorate([
        ag_grid_community_1.Autowired('mouseEventService'),
        __metadata("design:type", ag_grid_community_1.MouseEventService)
    ], RangeController.prototype, "mouseEventService", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", ag_grid_community_1.GridOptionsWrapper)
    ], RangeController.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        ag_grid_community_1.Autowired('columnApi'),
        __metadata("design:type", ag_grid_community_1.ColumnApi)
    ], RangeController.prototype, "columnApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('gridApi'),
        __metadata("design:type", ag_grid_community_1.GridApi)
    ], RangeController.prototype, "gridApi", void 0);
    __decorate([
        ag_grid_community_1.Autowired('cellNavigationService'),
        __metadata("design:type", ag_grid_community_1.CellNavigationService)
    ], RangeController.prototype, "cellNavigationService", void 0);
    __decorate([
        ag_grid_community_1.Autowired("pinnedRowModel"),
        __metadata("design:type", ag_grid_community_1.PinnedRowModel)
    ], RangeController.prototype, "pinnedRowModel", void 0);
    __decorate([
        ag_grid_community_1.Autowired('rowPositionUtils'),
        __metadata("design:type", ag_grid_community_1.RowPositionUtils)
    ], RangeController.prototype, "rowPositionUtils", void 0);
    __decorate([
        ag_grid_community_1.Autowired('cellPositionUtils'),
        __metadata("design:type", ag_grid_community_1.CellPositionUtils)