[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Deployment
 [Collapse]Task-Based Help
  [Expand]Business Model Design
  [Expand]Application Model
  [Expand]Actions
  [Expand]Navigation
  [Expand]Views
  [Collapse]List Editors
    How to: Configure Bands in a Grid List Editor (WinForms and ASP.NET)
    How to: Edit a Reference Property in the Batch Edit Mode
    How to: Implement a Custom WinForms List Editor
    How to: Implement an ASP.NET Web List Editor Using a Custom Control
    How to: Support a Context Menu for a Custom WinForms List Editor
  [Expand]Property Editors
  [Expand]Templates
  [Expand]Filtering
  [Expand]Reporting
  [Expand]Dashboards
  [Expand]Scheduler and Notifications
  [Expand]Maps
  [Expand]Security
  [Expand]Workflow
  [Expand]Localization
  [Expand]Testing
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Edit a Reference Property in the Batch Edit Mode

By default, the batch edit mode does not support the editing of reference property values. However, you can enable this option in your project for a specific reference property. In ASP.NET applications, ASPxGridView performs batch editing on the client side, it is not possible to process or pass values from editors placed inside Templates on the server side. Thus, in this example, all processing is performed on the client side.

Tip

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T363424.

The following steps demonstrate how to create a custom editor inside the custom ReferencedTemplate template.

  1. Create the following ExampleObject and ReferencedObject business classes. Add the ExampleObject.LookupReferencedObject reference property of the ReferencedObject type.

  2. Add the ReferencedTemplate class to the Editors folder of the ASP.NET module project. Implement the ITemplate.InstantiateIn method to create a new ASPxComboBox editor containing ReferencedObject items and the "N/A" item.

  3. Finally, create the CreateCustomEditItemTemplateController in the Controllers folder of the ASP.NET module project to subscribe to client-side events and update cell values as demonstrates below.

You can now run the application and see the result. The LookupReferencedObject values can now be edited in the batch mode.

Is this topic helpful?​​​​​​​