Sep 27, 2018, 9:19 AM
[FIXED] [#1618] [4.7.1] Selectbox Expand event is not triggering on first selection
Hi,
The Expand event of Selectbox is NOT triggering the event on first click/selection, it's triggering on second click. Please see the sample code below and let us know what i missed or any suggestion?. For the ComboBox the same code is working fine and event is firing on first selection/click only.
The Expand event of Selectbox is NOT triggering the event on first click/selection, it's triggering on second click. Please see the sample code below and let us know what i missed or any suggestion?. For the ComboBox the same code is working fine and event is firing on first selection/click only.
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>SelectBox - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<script type="text/javascript">
function loadData()
{
alert('expand clicked');
var myData = [
['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'],
['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'],
['Altria Group Inc', 83.81, 0.28, 0.34, '9/1 12:00am'],
['American Express Company', 52.55, 0.01, 0.02, '9/1 12:00am'],
['American International Group, Inc.', 64.13, 0.31, 0.49, '9/1 12:00am'],
['AT&T Inc.', 31.61, -0.48, -1.54, '9/1 12:00am'],
['Boeing Co.', 75.43, 0.53, 0.71, '9/1 12:00am'],
['Caterpillar Inc.', 67.27, 0.92, 1.39, '9/1 12:00am'],
['Citigroup, Inc.', 49.37, 0.02, 0.04, '9/1 12:00am'],
['E.I. du Pont de Nemours and Company', 40.48, 0.51, 1.28, '9/1 12:00am']
];
App.SelectBox1.store.loadData(myData);
}
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<h3>SelectBox</h3>
<p>A Component similar to an HTML SELECT input. If you click and drag on the items list, no selection is made.</p>
<ext:SelectBox
ID="SelectBox1"
runat="server"
DisplayField="state"
ValueField="abbr"
EmptyText="Select a state...">
<Listeners>
<Expand Handler="loadData();" Single="true" />
</Listeners>
<Store>
<ext:Store runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="abbr" />
<ext:ModelField Name="state" />
<ext:ModelField Name="nick" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:SelectBox>
</form>
</body>
</html>
Last edited by fabricio.murta; Feb 20, 2019 at 4:51 AM.
Reason: no feedback from the user in 7+ days