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

Cascading Editors (Batch Editing)

New
Customer Name 
Country 
City 
Inserted values
Updated values
Deleted values
EditMaria AndersFaroe IslandsTorshavn
EditThomas HardyAustriaEisenstadt
EditYang WangBermudaHamilton
EditElizabeth BrownSwitzerlandZurich
EditSven OttliebUzbekistanMarghilon
EditJanine LabruneVietnamHanoi
EditMartine RanceHoly SeeVatican City
EditMaria LarssonVirgin IslandsCharlotte Amalie
EditPeter FrankenYemenAden
EditCarlos HernandezAmerican SamoaPago Pago
Page 1 of 2 (14 items)Prev12Next
Preview changes
Save changes
Cancel changes


The DevExpress ASP.NET MVC Grid View allows you to incorporate cascading comboboxes, wherein a value selected within one combobox limits choices in the second combobox. This demo illustrates how to add cascading comboboxes in Batch Edit mode.

Implementation:

  • In this demo, the "Country" column editor raises a SelectedIndexChanged event when a user selects a different country. We use the PerformCallback method for the "City" column editor and obtain cities that correspond to the selected country from the server.
  • The grid uses a single instance of a column editor for all cells in this column. Before a user starts editing a value in the "City" column, you need to check and update items for the combobox editor. To update items, handle the MVCxGridView's client-side BatchEditStartEditing event and call the "City" combobox's PerformCallback method with the selected country.

    On the server side, call the GridViewExtension.GetComboBoxCallbackResult method in the Controller Action ("GetCitiesBatchEdit") to return the result in JSON format for the "City" combobox.

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