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

Updating text input of a textbox from another textbox.

1 Answer 38 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
job
Top achievements
Rank 2
job asked on 09 Dec 2014, 12:05 PM
I have 3 textboxes 1.Quantity 2. Price 3. Total when i enter text in
price i want Total.Text = Quantity.Text * Price.Text  of course all are
converted to int.
i want the text of Total to changed as Price is
being Entered. Currently i am using Price_TextChanged but its not
working as i want it to.
here is the Code:
           try
            {
              Total = Quantity * MyPrice;       
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
this only works when Price loses focus that is when total changes.
i have bound all the TextBoxes with properties and i am implementing INotifyPropertyChanged.
So what is the problem?

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 12 Dec 2014, 10:55 AM
Hi Job,

Please find an attached project that demonstrates this scenario.

I hope this helps. Let us know if you have further questions.


Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TextBox
Asked by
job
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or