I have a control that relies on OnValueChanged Client side event to fire a request to my server.
When I receive data back from the server, I replace the text in the RadTextBox with a value received from the server and the event fires again, regetting the data from the server, then refiring the event... etc.
I have tried to suppress the behavior as follows, which it does, but then the control goes into a crazy loop and I cannot even enter text into it.
this code is called from the valuechanged event handler:
//prevent valuechanged from firing again...
var si = $find("<%= SearchInput.ClientID %>");
si.remove_valueChanged(SearchInput_valuechanged);
si.set_value(requestor.RequestorID.toUpperCase());
si.add_valueChanged(SearchInput_valuechanged);
so I get caught in this viscious loop which doesn't make any sense, now the textbox will not allow any input and it does not fire the event.
for example, after the above code runs, the next time I try to enter text in the RadTextBox it accepts one character input then resets it to the previous text and does not fire the valuechanged event. I have only tested this in IE7, but this should not be right, the above code should work, unless it is resetting the event handler incorrectly.