Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Multiple Cell Selection

Product Name 
Category Name 
Unit Price 
Inserted values
Updated values
Deleted values
ChaiBeverages$18.00
ChangBeverages$19.00
Aniseed SyrupCondiments$10.00
Chef Anton's Cajun SeasoningCondiments$22.00
Chef Anton's Gumbo MixCondiments$21.35
Grandma's Boysenberry SpreadCondiments$25.00
Uncle Bob's Organic Dried PearsProduce$30.00
Northwoods Cranberry SauceCondiments$40.00
Mishi Kobe NikuMeat/Poultry$97.00
IkuraSeafood$31.00
Page 1 of 8 (77 items)Prev12345678Next
Preview changes
Save changes
Cancel changes
 

The DevExpress ASP.NET GridView (ASPxGridView) allows you to manage multiple cell in batch edit mode.

To enable this functionality, set the ASPxGridView.SettingsEditing.Mode property to 'Batch' and enable the BatchEditSettings.EnableMultipleCellSelection property.

Select cells in UI

Users can select multiple cells with the mouse or keyboard:

  • Click a cell and drag over cells while holding the left mouse button.
  • Hold Shift and press the arrow keys to select a contiguous cell range. To add non-adjacent cells to the current selection, press Ctrl and click the cells.
Manage cells in UI

Users can use keyboard and context menu to manage cells:

  • Copy and paste the selected cells in the same grid, or a sheet of an Excel file or Spreadsheet.

    Select cells and press Ctrl+C. Select the cell range where you want to paste the copied cells and press Ctrl+V.

  • Paste a value in all selected cells.

    Copy a value to the clipboard. Select the cells and press Ctrl+V to paste the copied value in all selected cells.

  • Use the context menu to copy/paste cell values.

    Right-click the selected cells to invoke the context menu.

Cell Selection API

The ASPxGridView raises the ASPxClientGridView.CellSelectionChanging event when you select or unselect a cell. In this event handler, you can get the current selection state of the processed cell (e.newSelectionState) and disable selection (e.cancel).

You can also use the ASPxClientGridView.batchEditApi.GetSelectedCells method to get a collection of selected cells. The ASPxClientGridView.batchEditApi.SelectCell and ASPxClientGridView.batchEditApi.UnselectCell methods to select or unselect a cell.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxGridViewDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxGridViewDemos