Canceled event is not reverting RadButton to initial value

5 posts, 1 answers
  1. Brett
    Brett avatar
    42 posts
    Member since:
    Aug 2014

    Posted 27 Feb 2015 Link to this post

    Setting the cancel property (to true) of the telerik eventArgument (e) accompanying the RadButton Client OnValueChanging event is no longer setting the value back to the oldValue or initialValue.

    I put up a StackOverflow Question in this regard.
    http://stackoverflow.com/questions/28769622/canceled-event-is-not-reverting-radbutton-to-initial-value
  2. Brett
    Brett avatar
    42 posts
    Member since:
    Aug 2014

    Posted 27 Feb 2015 Link to this post

    actually.. it does revert the value back if I blur / raise the onchange event of the radTextbox a second time. I have debugged through this, and it is setting e._cancel to true each time.

    I have also commented out the xhr.send line, forcing it to return my error response: `{ "isValid" : false, "isOverrideable" : false, "StatusCode" : 500 }`. the issue persists.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brett
    Brett avatar
    42 posts
    Member since:
    Aug 2014

    Posted 02 Mar 2015 Link to this post

    The issue seems to be with sender.get_editValue in the sender._setValue method.. when is the edit value assigned/determined.. is it not before the OnValueChange event is raised?
  5. Brett
    Brett avatar
    42 posts
    Member since:
    Aug 2014

    Posted 02 Mar 2015 in reply to Brett Link to this post

    First, can a moderator move this thread to the Appropriate RadTextbox forum, I just noticed that I apparently put this in the RadButton forum..


    I'm still not sure what the root of the issue is, but I can see how to resolve/workaround this behavior.

    sender.get_displayValue, sender.get_editValue, sender._text don't reflect the value in e.get_newValue() ... explicitly calling sender._setHiddenValue(e.get_newValue) seems to resolve canceling of the event properly.. 


    The canceled event handler seems to call sender._SetValue(sender._initialValueAsText), (I kind of expected it to use e.get_oldValue, but I suppose keeping the initial value with the control instance reduces/prevents timing and sync issues/considerations).. Since _SetValue essentially call sender._setHiddenValue.. I would expect, at the very least, that sender._value should reflect to the value of e.get_newValue();
  6. Answer
    Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 04 Mar 2015 Link to this post

    Hi Brett,

    This is an issue with the control. I have logged it here, so that you can monitor, comment and vote on it. As a small token of gratitude for reporting this issue to us I have updated your Telerik points.

    Regards,
    Danail Vasilev
    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017