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

Update TextBox.Text without firing an event

1 Answer 370 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Yury Babaev
Top achievements
Rank 1
Yury Babaev asked on 06 May 2010, 01:19 PM
Hello!

Is it possible to change TextBox.Text value programmatically without firing "TextChanging" event?
I'm looking for something like
textBox.BeginUpdate(); 
textBox.Text = "Leave no tracks behind"
textBox.EndUpdate(); 
Best regards, Yury Babaev.

1 Answer, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 12 May 2010, 09:08 AM
Hi Yury Babaev,

By design RadTextBox fires the TextChanged event when the text is changed and this cannot be done silently. The behavior of the Microsoft TextBox control is the same. My advice is to use a flag and skip the actions in the TextChanged event when the flag is raised. Or you can unsubscribe from this event before the text change subscribe to it after that.

Kind regards,
Dobry Zranchev
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.
Tags
TextBox
Asked by
Yury Babaev
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Share this question
or