[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Collapse]Form Layout
     ASPxFormLayout Overview
    [Collapse]Concepts
     [Collapse]Binding to Data
       Binding to Data Overview
       Binding to a Data Source
       Binding to a Single Object
      Item Manipulation
      Adaptivity
    [Expand]Visual Elements
   [Expand]Menu
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Ribbon
   [Expand]Site Map Control
   [Expand]Splitter
   [Expand]Tag Cloud Control
   [Expand]Title Index
   [Expand]TreeView
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to Data Overview

You can use the ASPxFormLayout control to edit and display fields of any data source. In this case, layout items of the ASPxFormLayout control are bound to data source fields using the LayoutItem.FieldName property. Each layout item can contain a nested control that allows the edit and display of corresponding field type values.

Expanded Seamless Integration with DevExpress Data Editors

DevExpress Data Editors, derived from the ASPxEditBase class, can be seamlessly integrated into a FormLayout bound to data. To use the DevExpress Data Editors for editing and displaying data source fields, do the following.

  • Bind the required layout item to a data source field by specifying the LayoutItem.FieldName property value.
  • Nest the appropriate DevExpress Data Editor into this layout item.

Below is the list of DevExpress Data Editors that can be seamlessly integrated with the FormLayout.

The code sample below demonstrates how to bind the ASPxFormLayout control to SqlDataSource. In this example, the ASPxTextBox control is used to edit Category Name field values, the ASPxMemo control is used to edit Description field values, and the ASPxBinaryImage control is used to display binary images, stored within the Picture field.

The code result is shown in the image below.

Expanded Passing Data to a Custom Nested Control

You can use any control (even third-party controls) to edit and display data source fields. In this case, you should handle the ASPxFormLayout.LayoutItemDataBound event.

The code sample below demonstrates how to use the standard TextBox control for editing the "FirstName" and "LastName" fields of a datasource to which the FormLayout is bound.

Expanded See Also

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