This demo illustrates how the DevExpress ASP.NET Ribbon (ASPxRibbon) control can be populated with information taken from a data source. The ASPxRibbon control can be bound to a data source in a standard manner - using the DataSourceID or DataSource property. While binding, the control automatically creates tabs, groups and items; and retrieves their property values from the corresponding data items.
You can specify the data source fields to which the tabs, groups and items properties are mapped using the TabDataFields, GroupDataFields, and ItemDataFields properties, respectively.
Additionally, ASPxRibbon 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.
- DataBound – occurs after the control data binding is complete, and allows you to customize the control.
In this demo, the ribbon control is bound to a standard XmlDataSource type data source by specifying the DataSourceID property. The tab, group, and item property values are obtained automatically because the data item attributes are named according to the corresponding default property values.