Nov 17, 2014, 4:38 AM
[CLOSED] Expand get collapsed after message box OK button click
Hi,
I need to validate a combo on button click and if not validate then show a message box and combo get expand,but combo collapse after message box ok button click.please see the code.
I need to validate a combo on button click and if not validate then show a message box and combo get expand,but combo collapse after message box ok button click.please see the code.
@(X.ComboBox().ID("combo")
.Items
(
new ListItem("VALUE 1","1"),
new ListItem("VALUE 2","2"),
new ListItem("VALUE 3","3")
)
)
@(X.Button().ID("btn")
.Text("Validate Combo")
.Listeners(l =>
{
l.Click.Handler = @"if(App.combo.getValue()<=0)
{
Ext.Msg.show({
title:'Warning',
msg: 'Select a value from combo.',
buttons: Ext.Msg.OK,
icon: Ext.Msg.INFO
});
App.combo.expand();
}
";
})
)
Last edited by Daniil; Nov 25, 2014 at 3:07 PM.
Reason: [CLOSED]