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

Decimal Values

14 Answers 267 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 11 Oct 2007, 01:26 PM
I submitted a suggestion along these lines and Telerik wanted to hear if anyone else thought it might be a good idea. Please give your two cents.

It appears the current RadSlider "Value" property is of type Integer in the Beta. In the first release, this should be of type Double in order to allow for decimal values. Any other Value-related properties should also have this change... like MaximumValue, Minimum alue and SlideStep.

Of course, integer values can  be scaled to decimals, but I don't see why this complication should be put upon the developer when there doesn't seem to be any reason to exclude the ability from using decimal values in the slider itself.

14 Answers, 1 is accepted

Sort by
0
Bill Alexander
Top achievements
Rank 1
answered on 16 Nov 2007, 02:06 PM
I absolutely agree
0
Georgi Tunev
Telerik team
answered on 16 Nov 2007, 02:50 PM

Thank you for your vote Bill - it has been taken into consideration.




Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ewart
Top achievements
Rank 1
answered on 25 Feb 2008, 09:51 AM
Same here, I was surprised it was an int but I guess you can work around it.  I have a kilometer per hour slider (range 2 to 25) and wanted an increment (step) of 0.5 -for now I will try to work around it with a larger range and divide by 2..

cheers
ewart.
0
Dave
Top achievements
Rank 1
answered on 09 May 2008, 03:02 PM
I agree as well.  Decimals should be allowed.  You should add a property to the RadSlider that allows you to specify whether you want to use integers (whole numbers) or decimals/doubles.  I have a real need for it.  I am wanting to use the RadSlider in my application to allow our staff to specify how much time they spent on customer requests and they can definitely spend tenths of hours working on customer requests.  Please consider in a future release.
0
Georgi Tunev
Telerik team
answered on 12 May 2008, 08:04 AM
Hello guys,

Thank you for the feedback - I added it to the feature request. I would also like to provide you with some information on what is going on with the slider control:

Currently we are reworking the rendering mechanism and the logic of RadSlider so we can provide the following features which are set with highest priority in our ToDo list:
  1. Two-thumb functionality.
  2. The ability to set the width and height of the control in percents
  3. More flexible mechanism for determining the physical and logical length of the track (currently Length property sets the physical value and the logical length is being calculated based on MinValue and MaxValue properties)
  4. Tickmarks for the values the slider takes.
These are the main features and they are scheduled to appear for the Q2 release. We will do our best to provide the "decimal values" feature as well, however at this point I cannot promise you for sure that we will manage to do that. The feature itself is not so easy to achieve and we will start working on it right after we finish the task which are logged with higher priorities.

I hope this information helps.


Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ewart
Top achievements
Rank 1
answered on 12 May 2008, 08:48 AM
Thanks Georgi, I would agree decimals is lower priority to most other things as there is an easy workaround by scaling integers. 

I know this post has been located by several people searching for answers but in hindsight I'd rarther telerik put perhaps a smaller amount of time into improving the demos (or docs) to make the issue clearer, and ditch the decimals request.  

As a new user, having a decimals demo would have lead me to the answer quickly.  Mind you, once the search issues in the forums is resolved then the forums will be a pretty gooddrepository for answers too.

cheers
ewart.
0
Georgi Tunev
Telerik team
answered on 13 May 2008, 12:24 PM
Hi Ewart,

Yes you are right - we will consider adding a KB article that shows a possible workaround.

By the way, if you have used such workaround and found it useful in your scenarios, you can share it with the rest of Telerik's community in the Code Library section on our site - I am sure the other members of the community will appreciate it.



Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Axe
Top achievements
Rank 1
answered on 12 Jun 2008, 07:28 AM
Agree with all the above.
Need decimals. However two thumb functionality is right up there :)

Any work arounds yet?

I need percentage rates for banking apps and what I'm thinking is to use min:0 max:10000 then using javascript add a decimal point.

I will give it a go.

Alex
0
Georgi Tunev
Telerik team
answered on 16 Jun 2008, 01:47 PM
Hi Axe,

Here is one possible workaround - I hope it helps:

<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
<script type="text/javascript"
function OnClientValueChange(sender, args) 
    var txtValue = $get('<%= txtCurrentValue.ClientID %>'); 
    txtValue.value = (sender.get_value() / 100) + '%'; 
</script> 
</telerik:RadCodeBlock> 
 
<asp:Label ID="lblCurrentValue" runat="server" Text="Current value: "></asp:Label> 
<asp:TextBox ID="txtCurrentValue" runat="server" Text="0%" ReadOnly="true"></asp:TextBox> 
<telerik:RadSlider ID="RadSlider1" runat="server"  
    MinimumValue="0"  
    MaximumValue="10000"  
    Length="1024" 
    Value="0" 
    OnClientValueChange="OnClientValueChange" /> 
 


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Axe
Top achievements
Rank 1
answered on 16 Jun 2008, 02:33 PM
That will go the trick.

I havn't tried it out but is pretty much what I was thinking.

Thanks
0
Elliott
Top achievements
Rank 1
answered on 20 Jul 2009, 05:19 PM
Is there a workaround that will display tick values? I need a slider for hours, with half hour increments. 480 minutes for 8 hours would be difficult for some people to understand.
0
Tsvetie
Telerik team
answered on 22 Jul 2009, 08:49 AM
Hi Elliott,
The RadSlider cannot create ticks with decimal text, but you can use your own image as background for the control, instead the ticks that the slider creates. I have attached a simple page in order to demonstrate my idea.

Greetings,
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.
0
David
Top achievements
Rank 1
answered on 25 Aug 2009, 09:56 AM
Hi there,
is there any update as to if/when the slider control will be able to handle decimal values?

Thanks
David
0
Tsvetie
Telerik team
answered on 27 Aug 2009, 08:23 AM
Hello David,
This feature is not on our TODO list for the next Q - Q3 2009. However, we will do our best to include it for the Q1 2010 version of the control.

Greetings,
Tsvetie
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Slider
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Bill Alexander
Top achievements
Rank 1
Georgi Tunev
Telerik team
ewart
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Axe
Top achievements
Rank 1
Elliott
Top achievements
Rank 1
Tsvetie
Telerik team
David
Top achievements
Rank 1
Share this question
or