Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ag-grid-angular
Advanced tools
ag-grid-angular is a powerful data grid component for Angular applications. It provides a wide range of features for displaying, editing, and managing data in a tabular format. It is highly customizable and supports large datasets, making it suitable for enterprise applications.
Basic Grid Setup
This code sets up a basic ag-Grid in an Angular component. The `rowData` and `columnDefs` properties are used to define the data and columns of the grid.
<ag-grid-angular
style="width: 100%; height: 350px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs">
</ag-grid-angular>
Sorting and Filtering
This code enables sorting and filtering on all columns by setting the `sortable` and `filter` properties in the `defaultColDef` object.
<ag-grid-angular
style="width: 100%; height: 350px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs"
[defaultColDef]="{ sortable: true, filter: true }">
</ag-grid-angular>
Row Selection
This code enables multiple row selection in the grid by setting the `rowSelection` property to `multiple`.
<ag-grid-angular
style="width: 100%; height: 350px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs"
rowSelection="multiple">
</ag-grid-angular>
Cell Editing
This code enables cell editing for all columns by setting the `editable` property in the `defaultColDef` object.
<ag-grid-angular
style="width: 100%; height: 350px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs"
[defaultColDef]="{ editable: true }">
</ag-grid-angular>
Pagination
This code enables pagination in the grid and sets the page size to 10 rows per page by using the `pagination` and `paginationPageSize` properties.
<ag-grid-angular
style="width: 100%; height: 350px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs"
pagination="true"
paginationPageSize="10">
</ag-grid-angular>
ngx-datatable is a lightweight Angular component for presenting large and complex data. It offers features like sorting, filtering, and pagination. Compared to ag-grid-angular, ngx-datatable is simpler and may be easier to use for smaller projects, but it lacks some of the advanced features and performance optimizations of ag-grid-angular.
PrimeNG is a comprehensive UI component library for Angular, which includes a powerful data table component. It offers a wide range of features, including sorting, filtering, pagination, and row selection. PrimeNG is comparable to ag-grid-angular in terms of functionality, but it also provides a broader set of UI components beyond just data tables.
Angular Material is the official Material Design component library for Angular. It includes a data table component with features like sorting, pagination, and filtering. While it is not as feature-rich as ag-grid-angular, it integrates seamlessly with other Angular Material components and follows the Material Design guidelines.
ag-Grid is a fully-featured and highly customizable JavaScript data grid. It delivers outstanding performance, has no 3rd party dependencies and integrates smoothly with Angular as Angular Component. Here's how our grid looks like with multiple filters and grouping enabled:
Version 22.1.1 of ag-grid-angular
is the last version that supports Angular 5 and before.
Version 23 onwards of ag-grid-angular
will support Angular 6+ only.
Besides the standard set of features you'd expect from any grid:
Here are some of the features that make ag-Grid stand out:
* The features marked with an asterisk are available in the enterprise version only.
Check out developers documentation for a complete list of features or visit our official docs for tutorials and feature demos.
Use the setup instructions below or go through a 5-minute-quickstart guide.
$ npm i --save ag-grid-community ag-grid-angular
AgGridModule
and add it to the App
moduleimport { AgGridModule } from 'ag-grid-angular';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, AgGridModule.withComponents([])],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
styles.css
@import "~ag-grid-community/dist/styles/ag-grid.css";
@import "~ag-grid-community/dist/styles/ag-theme-balham.css";
export class AppComponent {
title = 'app';
columnDefs = [
{headerName: 'Make', field: 'make' },
{headerName: 'Model', field: 'model' },
{headerName: 'Price', field: 'price'}
];
rowData = [
{ make: 'Toyota', model: 'Celica', price: 35000 },
{ make: 'Ford', model: 'Mondeo', price: 32000 },
{ make: 'Porsche', model: 'Boxter', price: 72000 }
];
}
ag-grid-angular
child component<ag-grid-angular
style="width: 500px; height: 500px;"
class="ag-theme-balham"
[rowData]="rowData"
[columnDefs]="columnDefs">
</ag-grid-angular>
If you have found a bug, please report them at this repository issues
section. If you're using Enterprise version please use the private ticketing system to do that. For more information on support check out our dedicated page.
Look for similar problems on StackOverflow using the ag-grid
tag. If nothing seems related, post a new message there. Do not use GitHub issues to ask questions.
ag-Grid is developed by a team of co-located developers in London. If you want to join the team check out our jobs listing or send your application to info@ag-grid.com.
This project is licensed under the MIT license. See the LICENSE file for more info.
FAQs
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/ag-grid/ag-grid/blob/latest/documentation/ag-grid-docs/public/images/ag-logos/svg-logos/AG-Grid-Logo_Dark-Theme.svg?raw=true"/> <source
The npm package ag-grid-angular receives a total of 179,608 weekly downloads. As such, ag-grid-angular popularity was classified as popular.
We found that ag-grid-angular demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.