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

Perform calculation inside textbox

1 Answer 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 15 Mar 2016, 08:59 PM

Hi,

I'm wondering if anyone has come up with a way to perform calculations within a single TextBox or NumericTextBox?

For example, if I enter "3+5" as the text and then remove focus from the TextBox, I'd want the text value to update to "8". Similarly for other operations such as division or multiplication.

I've seen this behavior within other web applications ("You Need a Budget" comes to mind) and am wondering if a framework exists rather than building from scratch in javascript.

Thanks,

Jeff

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 16 Mar 2016, 03:27 PM
Hi Jeff,

No, I am afraid that RadTextBox does not provide such calculation functionality out-of-the-box and you will need to implement it on your own. You can find useful the RadTextBox's client-side OnBlur even during this process:
http://docs.telerik.com/devtools/aspnet-ajax/controls/textbox/client-side-programming/events/onblur


Regards,
Vessy
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or