I have a user control with several RadComboBoxes. My user control implements IScriptControl. It also has properties to allow the person using the control to set the handlers for events I am raising from the user control. I would like to handle the events from the comboboxes in my userControl javascript prototype, but I'm having an issue with this code:
_onDropDownSelectedIndexChanged: function(source, e){
if(!this._events) return;
var handler = this._events.getHandler("selectedIndexChanged");
if(handler)
handler(this,e);
}
The problem is the context of "this". I had expected it to be my prototype object, but it's not even though this is defined within my prototype.
Here's my hook up in my initialize:
ddlStore.add_selectedIndexChanged(this._onDropDownSelectedIndexChanged);
Any help or examples would be greatly appreciated.
_onDropDownSelectedIndexChanged: function(source, e){
if(!this._events) return;
var handler = this._events.getHandler("selectedIndexChanged");
if(handler)
handler(this,e);
}
The problem is the context of "this". I had expected it to be my prototype object, but it's not even though this is defined within my prototype.
Here's my hook up in my initialize:
ddlStore.add_selectedIndexChanged(this._onDropDownSelectedIndexChanged);
Any help or examples would be greatly appreciated.