Apr 23, 2015, 6:07 PM
[CLOSED] CommandColumn : Command.Confirmation.Message before DirectEvents fire
Hi I have a CommandColumn like bellow
I want to shoa a confirmation message box before
Html.X().CommandColumn()
.Width(80)
.Commands(
Html.X().GridCommand()
.Icon(Icon.ArrowDown)
.Menu(menu =>
{
menu.EnableScrolling = false;
menu.Items.Add(Html.X().MenuCommand()
.Text("Completed")
.Icon(Icon.Accept)
.CommandName("Completed")
);
menu.Items.Add(Html.X().MenuCommand()
.Text("Process")
.Icon(Icon.PlayGreen)
.CommandName("Process")
);
menu.Items.Add(Html.X().MenuCommand()
.Text("Pending")
.Icon(Icon.StopRed)
.CommandName("Pending")
);
})
.ToolTip(tt => tt.Text = "Menu")
)
//.Listeners(ls => ls.Command.Handler = "Ext.Msg.alert(command, record.data.MenuID);")
.DirectEvents(de =>
{
de.Command.Confirmation.Message = "";
/*de.Command.Before = @"return Ext.Msg.show({
title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNO,
icon: Ext.Msg.QUESTION
}); ";*/
de.Command.Action = "statuschange";
de.Command.ExtraParams.Add(new
{
MenuID = new JRawValue("record.data.MenuID"),
Status = new JRawValue("command")
});
de.Command.EventMask.ShowMask = true;
de.Command.Success = "#{GridPanel1}.getStore().reload()";
})
I try both Confirmation.Message
and Before
handler but in case Confirmation.Message
message not show and DirectEvents
fires and in case Before
handler message show but DirectEvents
fires at the same time.I want to shoa a confirmation message box before
DirectEvents
.
Last edited by Dimitris; Apr 24, 2015 at 11:19 AM.
Reason: [CLOSED]