Mar 10, 2010, 10:35 AM
Call method in the MessageBox.Confirm
Hi,
I've a MessageBox.Confirm and I need to call the method Save(object
sender, AjaxEventArgs) when the user click in the button "Yes"
confirming.
<div dir="ltr" style=""> I would like know can I do it?
My
source .ascx:
Source .cs, method to confirm the requisition:
attentions!
I've a MessageBox.Confirm and I need to call the method Save(object
sender, AjaxEventArgs) when the user click in the button "Yes"
confirming.
<div dir="ltr" style=""> I would like know can I do it?
My
source .ascx:
<ext:TriggerField ID="txtPddDesconto" runat="server" FieldLabel="Valor do Desconto"
Text="0,00" EnableKeyEvents="true" MaxLength="18" BlankText="Campo Valor do Desconto é obrigatório!">
<Listeners>
<KeyUp Fn="FormatarValorText" />
</Listeners>
<Triggers>
<ext:FieldTrigger IconCls="icon-Calculadora" HideTrigger="false" />
</Triggers>
<ToolTips>
<ext:ToolTip ID="ToolTipCalcularDesconto" runat="server" Html="Calcular Desconto">
</ext:ToolTip>
</ToolTips>
<Listeners>
<TriggerClick Handler="#{AjaxMethods}.ConfirmRequest();" />
</Listeners>
</ext:TriggerField>
MySource .cs, method to confirm the requisition:
[AjaxMethod]
public void ConfirmRequest(){
Ext.Msg.Confirm("Alerta!", "Valor Liquido do Pedido: R$ " + this.txtPddValorLiquido.Text + " Deseja confirmar o pedido?", new MessageBox.ButtonsConfig
{
Yes = new MessageBox.ButtonConfig
{
Handler = "...", //I need to call the method SaveClose here!
Text = "Yes"
},
No = new MessageBox.ButtonConfig
{
Text = "No"
}
}).Show();
}
Method SaveClose:
protect void SaveClose(object sender, AjaxEventArgs e){...}
Thanksattentions!