Skip to content

Latest commit

 

History

History
14 lines (6 loc) · 2.25 KB

File metadata and controls

14 lines (6 loc) · 2.25 KB

MVC DataGrid - How to use DropDownBox as a column editor in edit mode

This example illustrates how to define dxDropDownBox with an embedded dxDataGrid for editing data in MVC via an EditCellTemplate. Run the example and check the State column to see this approach in action.

For a client-side solution, please refer to the dxDataGrid - How to use dxDropDownBox as a column editor in edit mode example.

Click the "Show Implementation Details" link to see step-by-step instructions.

Description

Perform the following steps to complete this task: 

1. Use EditCellTemplate to define MVC DropDownBox for a required column.
2.  Implement the Template function to define MVC DataGrid and handle its selectionChanged event to pass selected keys to DropDownBox. In addition, handle the dxDropDownBox.valueChanged event to adjust the DataGrid selection
3. Use CellTemplate to covert an array of selected keys to a human-readable text.

For more information about MVC templates, please review the Implementing Templates help topic.