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

[Solved] JQuery updates not showing in currency text box until focusing in the text box.

2 Answers 49 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.
Craig
Top achievements
Rank 1
Craig asked on 09 Sep 2011, 07:28 PM
I have been fighting with this issue for a while now.  I can update the value in the currency text box but the value does not show until I focus on the field.  You can see it in the attached demo.  Start the solution, go to the services grid, click on add new item and enter a book price and percentage.  JQuery will calculate the customer price and update the customer price field but the value does not show until focus is put on the customer price field.

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 12 Sep 2011, 12:03 PM
Hello Craig,

 
The aforementioned behavior is expected. If you need to set the value of the numerictextbox you will need to use its value method:

$('#ServiceDiscount').change(function () {
    var discount = $(this).attr('value');
    var bookprice = $('#BookPrice').attr('value');
 
    var ndiscount = new Number(discount);
    var nbookprice = new Number(bookprice);
 
    var customerPrice = ndiscount * nbookprice;
    $('#CustomerPrice').data("tTextBox").value(customerPrice);
 
});


Regards,
Georgi Krustev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Craig
Top achievements
Rank 1
answered on 12 Sep 2011, 02:42 PM
That worked.  Thanks much.
Tags
NumericTextBox
Asked by
Craig
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Craig
Top achievements
Rank 1
Share this question
or