Sep 06, 2012, 8:21 AM
[CLOSED] Combo BeforeSelect Event
Hi,
When I have a beforeselect listener in a combo with a function inside it seems to loop the event fire. Or at least in v1.x with the same code doesn't have the same behaviour.
TEST CASE
When I have a beforeselect listener in a combo with a function inside it seems to loop the event fire. Or at least in v1.x with the same code doesn't have the same behaviour.
TEST CASE
<html>
<head runat="server">
<title>Ext.NET Examples</title>
<script type="text/javascript">
var myFunction = function (combo, record, index) {
var newValue = record.data.field1;
combo.collapse();
var messageWindow = Ext.Msg.show({ title: 'App Title',
msg: 'My question message....?',
buttons: Ext.Msg.YESNO,
fn: function (buttonId) {
if (buttonId == 'yes') {
combo.setValue(newValue);
}
},
icon: Ext.Msg.QUESTION
});
return false;
}
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:ComboBox runat="server">
<Items>
<ext:ListItem Text="Item 1" Value="1" Mode="Raw" />
<ext:ListItem Text="Item 2" Value="2" Mode="Raw" />
<ext:ListItem Text="Item 3" Value="3" Mode="Raw" />
</Items>
<Listeners>
<BeforeSelect Fn="myFunction" />
</Listeners>
</ext:ComboBox>
</form>
</body>
</html>
In my project I reproduce it with an store not with items inside the combo. If it might helps you.
Last edited by Daniil; Sep 07, 2012 at 8:51 AM.
Reason: [CLOSED]