Deleting selected rows and cell ranges via key press in ag-grid

By ag-Grid - 2020-12-09

Description

This post will show how to delete selected rows and cell ranges in ag-Grid by pressing the Backspace or Delete keys. We have demonstrated this in live samples in JavaScript, Angular, React and Vue.js.

Summary

  • Deleting Selected Rows and Cell Ranges via Key Press in ag-Grid This post will show how to delete selected rows and cell ranges in ag-Grid by pressing the Backspace or Delete keys.
  • If you'd like to implement additional custom behaviors on key press, you can learn more about the Suppress Keyboard Event approach in our documentation.
  • The range selection object holds which columns are in the range selection and the startIndex and the endIndex of the selected range.
  • Now that we know the row indexes and the columns that we need to update, we call the clearCells function to get the rows between the start and end index and update the column fields for the cells selected as shown below:

 

Topics

  1. Frontend (0.46)
  2. UX (0.36)
  3. Backend (0.09)

Similar Articles

Python enumerate(): Simplify Looping With Counters

By realpython - 2020-12-15

Once you learn about for loops in Python, you know that using an index to access items in a sequence isn't very Pythonic. So what do you do when you need that index value? In this tutorial, you'll lea ...