Thomson
Thomson

Reputation: 143

Getting Formatted Value in NumericTextBox

When i type the value 123456 in the numeric text box it displays with comma values like 123,456.00

If we access the value it will give me 123456. Now i have a requirement in which i need to get the display value (123,456.00).

Is there any way to get this ?

Thanks in Advance

Upvotes: 1

Views: 1341

Answers (1)

ezanker
ezanker

Reputation: 24738

KendoUI creates a second input for the formatted text with a class of k-formatted-value. So you could use jQuery to get the value of that input as follows:

var numerictextbox = $("#numerictextbox").data("kendoNumericTextBox");
alert(numerictextbox.element.parents(".k-numeric-wrap").find("input.k-formatted-value").val());

DEMO

Upvotes: 1

Related Questions