Feb 16, 2013, 5:12 PM
[CLOSED] Fire ComboBox Select Event on Client
Hi,
I have a ComboBox with a direct event, that fires on Select.
The Javascript function for forward correctly gets the next record and updates the combobox with hte next value, but I want to then fire the DirectEvent...how can I do that?
I have a ComboBox with a direct event, that fires on Select.
<ext:ComboBox runat="server" ID="cmboQuarters" DisplayField="Key" ValueField="Key">
<Store>
<ext:Store runat="server" ID="storeQuarter" >
<Model>
<ext:Model runat="server" IDProperty="Key">
<Fields>
<ext:ModelField Name="Key" Type="String" ></ext:ModelField>
<ext:ModelField Name="Value" Type="Date" ></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<DirectEvents>
<Select OnEvent="GetGridData">
<EventMask Msg="Fetching data..." MinDelay="0" ShowMask="true" Target="CustomTarget" CustomTarget="#{grid}" />
<ExtraParams>
<ext:Parameter Name="dateInfo" Value="this.value" Mode="Raw" />
</ExtraParams>
</Select>
</DirectEvents>
</ext:ComboBox>
I also have 2 buttons "<<" and ">>", that when clicked, would move the index back/forth through the list...The Javascript function for forward correctly gets the next record and updates the combobox with hte next value, but I want to then fire the DirectEvent...how can I do that?
var MoveForward = function()
{
var rec = #{cmboQuarters}.getStore().getById(#{cmboQuarters}.getValue());
var index=rec.index+1;
var newRec = #{cmboQuarters}.getStore().getAt(index);
#{cmboQuarters}.setValue(newRec.get('Key'));
//HOW TO FIRE DIRECT EVENT, SELECT?
return true;
}
Last edited by Daniil; Feb 21, 2013 at 3:50 AM.
Reason: [CLOSED]