TextChanged Fired on ALL RadTextBoxes even when content not changed

3 posts, 0 answers
  1. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 21 May 2008 Link to this post

    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. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 23 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 23 May 2008 Link to this post

    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.
Back to Top