Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/range-selection

Package Overview
Dependencies
Maintainers
0
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/range-selection

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue


Version published
Weekly downloads
0
Maintainers
0
Install size
7.33 MB
Created
Weekly downloads
 

Package description

What is @ag-grid-enterprise/range-selection?

@ag-grid-enterprise/range-selection is an npm package that extends the capabilities of ag-Grid, a popular JavaScript data grid, by adding advanced range selection features. This package allows users to select ranges of cells, perform operations on those ranges, and customize the behavior of range selection.

What are @ag-grid-enterprise/range-selection's main functionalities?

Basic Range Selection

This feature allows users to select a range of cells within the grid. The code sample demonstrates how to enable range selection by setting `enableRangeSelection` to `true` in the grid options.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/range-selection';

const gridOptions: GridOptions = {
  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 }
  ],
  enableRangeSelection: true
};

// setup the grid after the page has finished loading
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Range Selection Events

This feature allows users to listen for range selection events. The code sample demonstrates how to use the `onRangeSelectionChanged` event to log changes in the range selection.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/range-selection';

const gridOptions: GridOptions = {
  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 }
  ],
  enableRangeSelection: true,
  onRangeSelectionChanged: (event) => {
    console.log('Range selection changed:', event);
  }
};

// setup the grid after the page has finished loading
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Custom Range Selection Styles

This feature allows users to customize the styles of the selected range. The code sample demonstrates how to use the `getRangeSelectionStyle` callback to set a custom background color for the selected range.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/range-selection';

const gridOptions: GridOptions = {
  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 }
  ],
  enableRangeSelection: true,
  getRangeSelectionStyle: (params) => {
    return {
      backgroundColor: 'lightblue'
    };
  }
};

// setup the grid after the page has finished loading
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Other packages similar to @ag-grid-enterprise/range-selection

Readme

Source

AG Grid Enterprise

This project contains AG Grid Enterprise features.

See www.ag-grid.com for an overview and full documentation.

Frameworks Supported

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

Issue Reporting

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

Keywords

FAQs

Package last updated on 13 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc