PDA

View Full Version : [CLOSED] Linked Combobox can't work



gs_user
Apr 30, 2012, 6:01 AM
I have two combobox, when one of the selected, another have to change items
I refrence the sample, but still can't work



<ext:Window ID="WinDocIns" runat="server" Collapsible="true" Height="640" Icon="Application"
Title="" Width="900" >

<Items>
<ext:Panel ID="Panel19" runat="server" Height="50" Title="Template" Collapsible="true" Region="South" Layout="AbsoluteLayout">
<Items>
<ext:ComboBox ID="cb_facdep" runat="server" X="0" Y="0" StoreID="Store20" Width="150" Editable="false"
DisplayField="MYDISPLAY" ValueField="MYVALUE" TypeAhead="true" Mode="Local" ForceSelection="true"
TriggerAction="All" EmptyText="Select...." SelectOnFocus="true" QueryMode="Local">
<Listeners>
<Select Handler="#{Storeodct02}.reload();" />
</Listeners>
</ext:ComboBox>
<ext:ComboBox ID="cb_template" runat="server" X="160" Y="0" Width="150"
DisplayField="cola" ValueField="colb" TypeAhead="true" QueryMode="Local" ForceSelection="true" TriggerAction="All"
ValueNotFoundText="Select template..." >
<Store>
<ext:Store ID="Storeodct02" runat="server" AutoLoad="false" >
<Model>
<ext:Model ID="Model10" runat="server" IDProperty="cola" OnReadData="ODCT02Refresh">
<Fields>
<ext:ModelField runat="server" Name="cola" Mapping="cola"/>
<ext:ModelField runat="server" Name="colb" Mapping="colb"/>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>

</Items>
</ext:Panel>
</Items>
</ext:Window>





protected void ODCT02Refresh(object sender, StoreRefreshDataEventArgs e)
{
DataTable gemtable;
this.Storeodct02.DataSource = gemtable;
this.Storeodct02.DataBind();


}

Daniil
Apr 30, 2012, 1:13 PM
Hi,

Is there any error? Does a request to server occur to load a data for the second ComboBox when you select an item of the first ComboBox?

I've checked our AJAX linked ComboBoxes example. It appears to be working correctly.

Could you update from SVN and re-test? I see you still use StoreRefreshDataEventArgs, but it has been renamed to StoreReadDataEventArgs in the latest sources.

If the issue persists with the latest sources, please provide a full sample to reproduce the error.

gs_user
May 02, 2012, 7:26 AM
I check my code, I find error,
It's can work..thank you


Hi,

Is there any error? Does a request to server occur to load a data for the second ComboBox when you select an item of the first ComboBox?

I've checked our AJAX linked ComboBoxes example. It appears to be working correctly.

Could you update from SVN and re-test? I see you still use StoreRefreshDataEventArgs, but it has been renamed to StoreReadDataEventArgs in the latest sources.

If the issue persists with the latest sources, please provide a full sample to reproduce the error.