[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Collapse]Common Concepts
    Web Application Project Templates
    Insert Extension Wizard
    Data Binding
   [Expand]Applying Themes
    Client-Side API
    Declaring Server-Side Event Handlers
    Templates
    Using Callbacks
    Passing Values to a Controller Action through Callbacks
    Using Extensions in Razor Views
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
   Reporting
  [Expand]Charting
  [Expand]Pivot Grid
   Spreadsheet
   Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Spell Checker
  [Expand]Query Builder
 [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]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)

Data Binding

All data-aware DevExpress MVC extensions expose the Bind method, allowing you to easily bind them to a data source (typically, it is a data Model passed from a Controller). There are also some additional methods facilitating data binding to certain declarative data sources. The table below lists data-aware extensions and corresponding available data binding methods.

Data-Aware Extension Name

Method to Bind to Data Model

Declarative Binding Methods

GridView

GridViewExtension.Bind

GridViewExtension.BindToEF

GridViewExtension.BindToLINQ

GridViewExtension.BindToXML

GridViewExtension.BindToCustomData

TreeList

TreeListExtension.Bind

TreeListExtension.BindToXML

TreeListExtension.BindToSiteMap

TreeListExtension.BindToVirtualData

PivotGrid

PivotGridExtension.Bind

PivotGridExtension.BindToOLAP

PivotGridExtension.BindToEF

PivotGridExtension.BindToLINQ

Menu

MenuExtension.Bind

MenuExtension.BindToXML

MenuExtension.BindToSiteMap

NavBar

NavBarExtension.Bind

NavBarExtension.BindToXML

NavBarExtension.BindToSiteMap

PopupControl

PopupControlExtension.Bind

PopupControlExtension.BindToXML

PopupControlExtension.BindToSiteMap

TabControl

TabControlExtension.Bind

TabControlExtension.BindToXML

TabControlExtension.BindToSiteMap

TreeView

TreeViewExtension.Bind

TreeViewExtension.BindToXML

TreeViewExtension.BindToSiteMap

Data Editor Extensions

EditorExtension.Bind

List Editors:

CheckBoxListExtension.BindList

ComboBoxExtension.BindList

ListBoxExtension.BindList

RadioButtonListExtension.BindList

TrackBarExtension.BindList

 

The following code demonstrates how to bind the Chart extension to a Model.

Model code:

View Code (Razor):

Controller code:

 

For specifics of binding DevExpress MVC data editors (listed in Data Editors Extensions), refer to the Binding Data Editors to Data topic.

Expanded See Also

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