I'm trying to use the RadTrackBar with Range mode, but I cannot access the values of the two ranges. I see in the documentation that I must use Ranges_CollectionChanged, but I don't understand how to access this function.
Do you have any example how to use two ranges.
Thank you,
Eduard
1 Answer, 1 is accepted
0
George
Telerik team
answered on 24 Jul 2013, 07:49 AM
Hi Eduard,
Thank you for writing.
Indeed to find the start and end values of the trackbar you need to subscribe to the CollectionChanged event of the Ranges collection in the RadTrackBar. Then on each change you can check the Action type and find the TrackBarRange element we need which has Start and End properties. Please take a look at the code snippet below.
if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged)
{
foreach (object item in e.NewItems)
{
TrackBarRange range = item as TrackBarRange;
if (range != null)
{
Console.WriteLine("Range {0} value {1}", range.Start, range.End);
}
}
}
}
Hope this helps, if you have any other questions or comments, please let me know.
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>