Avoid valueChanged event on set_value?

5 posts, 0 answers
  1. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 15 Apr 2009 Link to this post

    Hi there

    Is there any way to avoid the valueChanged event from firing when setting a textbox value using set_value(...)?

    Thanks
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 15 Apr 2009 Link to this post

    Hi Kenneth Siewers,

    Yes, you can use _SetValue(...) instead of set_value(...)


    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 15 Apr 2009 Link to this post

    I guess I'm using some internal function then? Is there any danger in using function prefixed with "_" ? Normally I try to avoid using such methods as I don't know if I'm messing up some internal state etc.
  5. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 15 Apr 2009 Link to this post

    Okay, I've tested the solution, but it seems like there's a problem.

    When the textbox is blurred it fires the event even though the values hasn't changed. I guess I can see the problem, as the set_value probably initializes the state, which now isn't set.

    I can see the eventargs contains old and new value and old_value is an empty string.
  6. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 15 Apr 2009 Link to this post

    I guess I've figured it out. If I set the _initialValue = _SetValue the problem goes away. It's not pretty but it works.

    It would be nice to have more control over the event triggering...
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017