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


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

To enable this functionality, set the GridViewSettings.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 GridView raises the MVCxClientGridView.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 MVCxClientGridView.batchEditApi.GetSelectedCells method to get a collection of selected cells. The MVCxClientGridView.batchEditApi.SelectCell and MVCxClientGridView.batchEditApi.UnselectCell methods to select or unselect a cell.


See Also:
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
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxGridViewDemos