You can data bind RadSlider items on the client to a RadClientDataSource control since Q2 2014.
This functionality is provided out of the box through the server-side ClientDataSourceID property
which also has its client-side counterpart - the set_clientDataSourceID() method.
Client-side data binding means fewer postbacks, easier integration with various data services and a more flexible client-side development.
To define the data binding options of the slider, use the ItemBinding composite property, just like when data binding it on the server:
- TextField—defines the data source field name which will be shown as the item text.
- ToolTipField—defines the data source field name which will be shown as the item tooltip.
- ValueField—defines the data source field name which will be used for the item's Value property.
In the simplest setup, you only need to provide an array of JSON literals to the RadSlider and define the corresponding data source field names
in the
ItemBinding composite property. You can find examples and read more details in the
RadSlider
client-side data binding help article.
In this demo you will see how to create a sample personality test by:
- data binding two sliders to a RadClientDataSource control.
- using their client-side events to change the page according to the data from the selected slider item.