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

Displaying units with % type field?

3 Answers 47 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 21 Oct 2008, 11:29 AM

Hi,

I am just evaluating the controls for use in our application - one requirement I have is to be able to display input type boxes with attached units - the behaviour I want is basically identical to that of the Percent input box but I need control over the symbol displayed on a text box by text box basis.

So for example I instead of:

3.25 %

in a text box, I would want to display things like:

3.25 kg      

or

3.25 m/s

How difficult would it be for me to modify one of the input controls to allow this kind of behaviour?

Thanks,

Jason

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 Oct 2008, 12:10 PM
Hello Jason ,

It is possible to set the number format of RadNumericTextBox as shown below:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server"
    <NumberFormat PositivePattern="n kg" NegativePattern="-n kg" /> 
</telerik:RadNumericTextBox> 

Let us know whether this helps.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jason
Top achievements
Rank 1
answered on 21 Oct 2008, 12:42 PM
That's excellent - it works perfectly.  Thank you very much. 

An additional point is it possible to allow the input of values with exponents - e.g. 1e3?
0
Daniel
Telerik team
answered on 21 Oct 2008, 01:46 PM
Hello Jason,

Currently our RadNumericTextBox control doesn't support such functionality.

Let us know if you need additional assistance.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Input
Asked by
Jason
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jason
Top achievements
Rank 1
Share this question
or