Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@ag-grid-enterprise/menu
Advanced tools
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
@ag-grid-enterprise/menu is a package that provides advanced menu functionalities for ag-Grid, a popular JavaScript data grid. It allows users to create custom context menus, column menus, and other interactive menu elements within the grid.
Custom Context Menu
This feature allows you to create a custom context menu that appears when a user right-clicks on a cell. The `onCellContextMenu` event is used to show the popup menu.
const gridOptions = {
onCellContextMenu: (params) => {
params.api.showPopupMenu(params.node, params.column, params.event);
},
popupParent: document.body,
columnDefs: [
{ field: 'make' },
{ field: 'model' },
{ field: 'price' }
],
rowData: [
{ make: 'Toyota', model: 'Celica', price: 35000 },
{ make: 'Ford', model: 'Mondeo', price: 32000 },
{ make: 'Porsche', model: 'Boxster', price: 72000 }
]
};
new agGrid.Grid(document.getElementById('myGrid'), gridOptions);
Column Menu
This feature allows you to add a column menu with tabs for filtering, general options, and column management. The `menuTabs` property in `defaultColDef` is used to specify which tabs to include.
const gridOptions = {
defaultColDef: {
menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab']
},
columnDefs: [
{ field: 'make' },
{ field: 'model' },
{ field: 'price' }
],
rowData: [
{ make: 'Toyota', model: 'Celica', price: 35000 },
{ make: 'Ford', model: 'Mondeo', price: 32000 },
{ make: 'Porsche', model: 'Boxster', price: 72000 }
]
};
new agGrid.Grid(document.getElementById('myGrid'), gridOptions);
Custom Menu Items
This feature allows you to add custom items to the context menu. The `getContextMenuItems` function is used to define the items, including built-in options and custom actions.
const gridOptions = {
getContextMenuItems: (params) => {
return [
'copy',
'copyWithHeaders',
'paste',
'separator',
{
name: 'Custom Menu Item',
action: () => { console.log('Custom Menu Item Clicked'); }
}
];
},
columnDefs: [
{ field: 'make' },
{ field: 'model' },
{ field: 'price' }
],
rowData: [
{ make: 'Toyota', model: 'Celica', price: 35000 },
{ make: 'Ford', model: 'Mondeo', price: 32000 },
{ make: 'Porsche', model: 'Boxster', price: 72000 }
]
};
new agGrid.Grid(document.getElementById('myGrid'), gridOptions);
Handsontable is a JavaScript data grid component with similar functionalities to ag-Grid, including context menus and column menus. It is known for its Excel-like appearance and behavior, making it a good alternative for users looking for spreadsheet-like features.
SlickGrid is another JavaScript grid component that offers advanced features like custom menus, column management, and data manipulation. It is highly customizable and performs well with large datasets, making it a strong competitor to ag-Grid.
Tabulator is a JavaScript library that provides interactive tables with features like custom context menus, column menus, and data filtering. It is easy to set up and offers a wide range of customization options, making it a versatile choice for data grid implementations.
This project contains AG Grid Enterprise features.
See www.ag-grid.com for an overview and full documentation.
Framework specific Getting Started guides:
Angular | Javascript | React | TypeScript | VueJS
This is not free software, this software is covered by copyright and to use you need a commercial license.
Please see files: LICENSE.md SUPPORT_AND_MAINTENANCE.md
If you are an Enterprise customer (or are evaluating AG Grid Enterprise) and wish to report a Bug or raise a new Feature Request please do so on our Support Portal.
To Sign Up: Send an email to accounts@ag-grid.com with your license key
FAQs
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
The npm package @ag-grid-enterprise/menu receives a total of 141,253 weekly downloads. As such, @ag-grid-enterprise/menu popularity was classified as popular.
We found that @ag-grid-enterprise/menu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.