Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ag-grid-angular
Advanced tools
![AG Grid HTML5 Grid trusted by the community, built for enterprise](./github-banner.png "AG Grid")
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:
See Angular Version Compatibility for which versions of Angular are supported by each AG Grid version.
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],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
styles.css
@import "~ag-grid-community/styles//ag-grid.css";
@import "~ag-grid-community/styles//ag-theme-alpine.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: 'Boxster', price: 72000 }
];
}
ag-grid-angular
child component<ag-grid-angular
style="width: 500px; height: 500px;"
class="ag-theme-alpine"
[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.
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 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 139,048 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.