This is a migrated thread and some comments may be shown as answers.

Bind RadSlider with Database

3 Answers 174 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Naveed
Top achievements
Rank 2
Naveed asked on 06 Jan 2009, 03:01 PM
Hi,

i want to bind RadSlider from database value,
so how can i bind the RadSlider from Database value.

3 Answers, 1 is accepted

Sort by
0
cbospikes
Top achievements
Rank 1
answered on 08 Jan 2009, 07:11 PM
try this:

For Each row As DataRow In futureSegmentsdt.Rows

                    Dim it As New RadSliderItem
                    With it
                        .Value = row.Item("ROUTESEGMENT_GUID").ToString()
                        .Text = row.Item("ROUTESEGMENT_ORIGINDATE").ToString()
                    End With
                    sli.Items.Add(it)

Next

This will bind the radslider item values and text

If you then need to set the value of the radslider to one of the existing radslideritems use this :

If Not sli.Items.FindItemByValue(routesegmentid) Is Nothing Then
                        sli.Value = sli.Items.FindItemByValue(routesegmentid).Index
End If






0
sumanth
Top achievements
Rank 2
answered on 17 Mar 2009, 06:40 AM
Hi

Plz tell me how to write the same in C# Code




Thank In Advance
0
Tsvetie
Telerik team
answered on 17 Mar 2009, 02:07 PM
Hello,
Please refer to our How to create a RadSliderItem for each record in a DataTable online article for information on databinding a RadSlider and code sample both in VB and C#.

Kind regards,
Tsvetie
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Slider
Asked by
Naveed
Top achievements
Rank 2
Answers by
cbospikes
Top achievements
Rank 1
sumanth
Top achievements
Rank 2
Tsvetie
Telerik team
Share this question
or