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

TextChanged Fired on ALL RadTextBoxes even when content not changed

2 Answers 76 Views
Input
This is a migrated thread and some comments may be shown as answers.
Doug Beard
Top achievements
Rank 2
Doug Beard asked on 21 May 2008, 12:59 PM
I have a customer control with several RadTextBoxes all set to Autopostback and a common TextChanged event wired to each.

If I change the text in a single text box, each RadTextBox fires the TextChanged event instead of just the one where the text was actually changed.

In fact, each RadTextBox fires the TextChanged event on all submits, including a button despite the fact that no text was actually changed.

Any idea how to prevent this happening?

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 May 2008, 08:25 AM
Hi Doug Beard,

I have not been able to replicate the erroneous behavior in my local tests. Find attached a sample page showing my observations and let us know what differs in your case. I would appreciate it if you modify it so that it exhibits the problem.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Beard
Top achievements
Rank 2
answered on 23 May 2008, 12:26 PM
Ya sorry, it was my bad.  The text property of the text boxes was referenced to another object that apparently, upon recreation, was essentially re-referencing the newly recreated object.  IOW, because the properties of this custom object were reloading on every post, and the textboxes that referenced the properties thought the text had changed, when in fact it hadn't. Technically I guess it had changed, since the state of the object was not maintained between posts.

I was surprised to find this behavior, but it was reproducible with the plain ole MS Textbox too.  Unfortunately we can not rely on view state, and thus this behavior, I think.

Thanks for your response.
Tags
Input
Asked by
Doug Beard
Top achievements
Rank 2
Answers by
Steve
Telerik team
Doug Beard
Top achievements
Rank 2
Share this question
or