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

Canceled event is not reverting RadButton to initial value

4 Answers 75 Views
Button
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 27 Feb 2015, 04:56 PM
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

4 Answers, 1 is accepted

Sort by
0
Brett
Top achievements
Rank 1
answered on 27 Feb 2015, 05:38 PM
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.
0
Brett
Top achievements
Rank 1
answered on 02 Mar 2015, 03:16 PM
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?
0
Brett
Top achievements
Rank 1
answered on 02 Mar 2015, 04:37 PM
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();
0
Accepted
Danail Vasilev
Telerik team
answered on 04 Mar 2015, 12:49 PM
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.

 
Tags
Button
Asked by
Brett
Top achievements
Rank 1
Answers by
Brett
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or