THEMES
THEME SETTINGS

Navigation and Layout - Ribbon Data Binding

  • Graph

    Graph
    po
  • Code

    Code
    po
  • DiscretepoContinuouspo
    Search by name:
    Blocks

    Blocks
    po
  • Edit

    Edit
    po
  • View

    View
    po

This demo illustrates how to bind the DevExpress ASP.NET MVC Ribbon extension to a Model passed to a View from the Controller. The Bind method is used to bind a Ribbon to the Model. Note that the Ribbon extension can only be bound to hierarchal data sources, and as such, a Model object passed to the Bind method must support the IHierarchicalEnumerable interface. During binding, the ribbon automatically creates tabs, groups and items, and retrieves their property values from the corresponding data items.

The Ribbon extension ships with the following data binding methods:

You can specify the data source fields to which the tab, group and item properties are mapped using the TabDataFields, GroupDataFields, and ItemDataFields properties, respectively.

Additionally, the Ribbon provides specific events related to data binding that can be handled according to your application logic.

  • TabDataBound – allows you to customize the settings of an individual tab immediately after it is bound to data.
  • GroupDataBound – allows you to customize the settings of an individual group immediately after it is bound to data.
  • ItemDataBound – allows you to customize the settings of an individual item immediately after it is bound to data.

In this demo, the Ribbon is bound to an XML file by passing the path to the file and the required XPath to the BindToXML method. The tab, group, and item property values are obtained automatically because the data item attributes are named according to the corresponding default property values.

Version: v2016 vol 2.6
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.