Jun 18, 2012, 12:17 AM
[CLOSED] Question about event calls by combo box value.
Hello.
I have a question about how to call different event when value is selected in combo box.
When page is loaded it calls Combo box which has ID "NowBook_Combo" and it loaded ('" + b_code_01 + "','" + b_code_02 + "','" + b_code_03 + "')
I want to make it calls different event when the value in combo box is selected.
Code is following...
[PageLoad] is the values which is loaded when page is load and [Change Event ReLoad] is what should be loaded when one of combo box value is selected.
I have a question about how to call different event when value is selected in combo box.
When page is loaded it calls Combo box which has ID "NowBook_Combo" and it loaded ('" + b_code_01 + "','" + b_code_02 + "','" + b_code_03 + "')
I want to make it calls different event when the value in combo box is selected.
Code is following...
[PageLoad] is the values which is loaded when page is load and [Change Event ReLoad] is what should be loaded when one of combo box value is selected.
<ext:Store ID="BasicBookStore" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="B_Code" />
<ext:RecordField Name="B_Name_S" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:ComboBox ID="NowBook_Combo" runat="server" Width="200" Editable="false" ForceSelection="true"
Mode="Local" StoreID="BasicBookStore" DisplayField="B_Name_S" ValueField="B_Code" ClientIDMode="Static" EmptyText="SelectBook">
<Listeners>
<Change Handler="getUnit01();" />
<Select Handler="Unit_01_Combo.setValue('');Unit_02_Combo.setValue('');Unit_03_Combo.setValue('');Unit_04_Combo.setValue('');Ext.net.DirectMethods.setUnit02(this.getValue());getUnit01();" />
</Listeners>
</ext:ComboBox>
[PageLoad]
string b_query = "select B_Code, B_Name_S from Book Where B_Code in ('" + b_code_01 + "','" + b_code_02 + "','" + b_code_03 + "')";
DataSet b_ds = DBConn.MSsqlGetExec(conn, b_query);
BasicBookStore.DataSource = b_ds.Tables[0];
BasicBookStore.DataBind();
[Change Event ReLoad]
string b_query = "select B_Code, B_Name_S from Book Where B_Code = '" + b_code + "'";
DataSet b_ds = DBConn.MSsqlGetExec(conn, b_query);
BasicBookStore.DataSource = b_ds.Tables[0];
BasicBookStore.DataBind();
Last edited by Daniil; Jun 26, 2012 at 10:17 PM.
Reason: [CLOSED]