Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[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]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Collapse]Image and Data Browsing
   [Expand]Product Information
   [Expand]DataView
   [Expand]Headline
   [Expand]Image Gallery
   [Collapse]Image Slider
     ASPxImageSlider Overview
    [Collapse]Binding to Data
      Binding to a Folder
      Binding to a Datasource
      Unbound Mode
    [Expand]Visual Elements
   [Expand]Image Zoom
   [Expand]News Control
   [Expand]Pager
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [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 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 a Datasource

The ASPxImageSlider can be populated with item information taken from a data source that can be specified by using either of the following properties.

The ASPxImageSlider supports two methods of retrieving data from a specified data source. One involves manually setting the control's specific data-related properties to data source item attribute names. The other one exploits the ASPxImageSlider ability to retrieve data automatically, given that the data source item attributes are named after the property names of an ImageSliderItem object.

Expanded Data Binding Using Mapping Properties

When the ASPxImageSlider control binds to a data source, an ImageSliderItem object is created automatically for every recognized data item. Individual item characteristics (such as text, name, image path, navigation location, and thumbnail path) are obtained from the data fields (item attributes) of the corresponding data items. The ASPxImageSlider exposes its specific data-related properties, allowing you to specify which data source fields the item information should be retrieved from. The table below lists these properties and the corresponding properties of the ImageSliderItem object.

Example

Expanded Automatic Data Binding

The ASPxImageSlider control has a built-in ability to automatically retrieve data from a data source after just one property (ASPxHierarchicalDataWebControl.DataSourceID or ASPxDataWebControlBase.DataSource) is specified.

The ASPxImageSlider can recognize the data items and retrieve some item characteristics from the data fields named in a specific way. If however, any of the data-related properties of an ASPxImageSlider control (such as ASPxImageSlider.TextField, ASPxImageSlider.ImageUrlField, etc.) have been set, then the mapping of the associated ImageSliderItem object properties will proceed according to Data Binding Using Mapping Properties.

During binding, an ASPxImageSlider control implements its automatic binding ability by retrieving item characteristics from those data fields whose names coincide with certain property names of an ImageSliderItem object. The table below lists the names of the item object properties that can be mapped during automatic binding, and the matching data field names you should use in the data source for the mapping to work.

Node properties that can be set automatically Data field names
ImageSliderItem.ImageUrl ImageUrl
ImageSliderItem.Name Name
ImageSliderItem.NavigateUrl NavigateUrl
ImageSliderItem.Text Text
ImageSliderItem.ThumbnailUrl ThumbnailUrl

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