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

[Solved] How can I get IncrementStep of NumericTextBoxFor by percentage of its orignal value

1 Answer 75 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Norbert D'souza
Top achievements
Rank 1
Norbert D'souza asked on 03 Jun 2011, 10:47 AM

Hi,

I want to get IncrementStep of NumericTextBoxFor by percentage of its orignal value.
For example the value of my NumericTextBoxFor is 1000. When I click the up button it should increment the value by 0.5% and the new value should be 1005
Again when I click the up button it should increment the original value by 0.5% and the new value should be 1005 + 1005 * .5 / 100 =

1010.03 (1010.025) and so on.
How can I achieve this??

Thanks,
Norbert

1 Answer, 1 is accepted

Sort by
0
Demon
Top achievements
Rank 1
answered on 03 Jun 2011, 11:03 AM
Hi,

You can use the component's OnLoad and OnChange events and set the step property of its client object.

$("#...id...").data("tTextBox").step = 0.5;
Tags
NumericTextBox
Asked by
Norbert D'souza
Top achievements
Rank 1
Answers by
Demon
Top achievements
Rank 1
Share this question
or