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

Range Selector minimum range

1 Answer 151 Views
RangeSelector
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 25 Jun 2015, 10:41 PM

Is there a property for RadRangeSelector that will let me control the minimum selected range? It looks like the rangeselector thumb is forcing me to a minimum selectable range of 3, which is 3% of the total 0 to 100 range. I need to be able to get it down as close as possible (with the only limitation being the radselectorthumb elements do not overlap).

 

Basically, I have a very large data set, and I need a selection ability in the 1 part in 30000 range. Right now the best I can do (with two cascaded radrangeselectors, one feeding the second) is 3% of 3% which is 0.09%. which is still 27 times greater mapped range than I need. If I can get the minimum selection down to 1%, then I can cascade two radrangeselectors to get me in the 1 part in 10000 range  and that should be ok to get by for now.

 

Manoj

 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 30 Jun 2015, 01:48 PM
Hi Manoj,

Thank you for writing.

As you have noticed yourself the value of the MinSelectionLength needs to be in the range between 3 and 100. This is related with the scaling of the associated control and how it is being visualized when the thumbs of the tracking element are being changed.

I am not exactly sure in what scenario you are using RadRangeSelector, but you can try setting the field with reflection: 
private void ChangeMinSelectionLength(RadRangeSelector radRangeSelector)
{
    RangeSelectorViewContainer container = radRangeSelector.RangeSelectorElement.BodyElement.ViewContainer as RangeSelectorViewContainer;
    if (container != null)
    {
        FieldInfo fi = container.TrackingElement.GetType().GetField("minSelectionLenght", BindingFlags.NonPublic | BindingFlags.Instance);
        fi.SetValue(container.TrackingElement, 1);
    }
}

Please note that this solution will let you perform a minimum selection of 1 but might also bring undesired side effects.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RangeSelector
Asked by
Manoj
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or