Thursday, April 17, 2014

I'm trying to find a way to reach back into JavaScript from a DevExpress Callback.

One ghetto hack to have a regular panel within the ASPxCallbackPanel like so:

<asp:Panel runat="server" ID="InnerPanel"></asp:Panel>

 
 

...and then add into it (from within the Callback) a control that will fire off a JavaScript event on creation like so:

var input = new ASPxImage();
input.ClientInstanceName = "somethingrandom" + DateTime.Now;
input.ClientSideEvents.Init = "InitTransactionInput";
InnerPanel.Controls.Add(input);

 
 

This would set off...

function InitTransactionInput(s, e) {
   alert('whatever');
}

No comments:

Post a Comment