PDA

View Full Version : [1.3] [2.0] No X.MessageBox from CodeBehind



ckarcz
Mar 07, 2012, 5:32 PM
I cannot fire a message box from codebehind using 1.3. I checked examples in 1.3/2.0 example explorer and get the same issue.

If you go to the example @ http://examples2.ext.net/#/Toolbar/Menu/Overview/

Click "With Menu" > "Menu Item 3"

You'll see a load mask, and the direct method is executed, but the message box is not displayed:

DirectMethod from example above:

<script runat="server">
protected void Menu3_Click(object sender, DirectEventArgs e)
{
X.MessageBox.Alert("Click", e.ExtraParams["Param"]);
}
</script>

All other actions performed with direct methods work fine for me.

Vladimir
Mar 07, 2012, 6:05 PM
Need to call Show method


X.MessageBox.Alert("Click", e.ExtraParams["Param"]).Show();

ckarcz
Mar 07, 2012, 6:34 PM
Works. I assumed it was like the js alert('text') and assumed the example was correct.

Thanks!

Dorababu
Mar 09, 2012, 9:56 AM
Need to call Show method


X.MessageBox.Alert("Click", e.ExtraParams["Param"]).Show();


A small question instead of getting all using e.ExtraParams["Values"] can we get the required value and assigned to alert box.

Daniil
Mar 09, 2012, 4:59 PM
A small question instead of getting all using e.ExtraParams["Values"] can we get the required value and assigned to alert box.

Please start a new forum thread.