[CLOSED] Question about event calls by combo box value.

  1. #1

    [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.

    <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]
  2. #2
    Hi,

    Do you want to call different server handlers for each selected value? I am afraid I don't understand the requirement well.

    What about to just use Select DirectEvent or call a DirectMethod withing a Select Listener?

    The selected value might be passed as a parameter.
  3. #3

    Details...

    Hello, Danill.

    It looks like there is some confusions.

    You can see snapshot. There are field and dropdown box called "date" and "name"

    When one of them is selected all dropdown boxes, radio btns, and textfields located below of them are reloaded.
    Codes in "[PageLoad]" to call it. You can see snapshot1.

    But, I want to make it calls different values, when specific "name" or "date" is selected.
    For example, when date is selected as 2012-06-11, one of dropbox box should show up "1919, 1920, 1921".
    But is shows different values as you can see in snapshot2.

    Please advice me to resolve this issues.


    Click image for larger version. 

Name:	snap.jpg 
Views:	82 
Size:	87.3 KB 
ID:	4378

    Click image for larger version. 

Name:	snap2.jpg 
Views:	96 
Size:	87.0 KB 
ID:	4379
  4. #4
    Not sure, but maybe you need to wrap data binding Page_Load code in
    if (!X.IsAjaxRequest) {
        //store data binding code
    }
    Unfortunately, I can't say anything more concrete, because I don't know how all is configured on the page.

    Providing us with a full sample to reproduce the problem would be best.

Similar Threads

  1. Combo box event handler
    By Shuaib in forum 1.x Help
    Replies: 1
    Last Post: Oct 10, 2012, 1:59 PM
  2. Replies: 4
    Last Post: Jun 29, 2012, 1:36 PM
  3. A question about Event
    By 罗纳德刚 in forum 1.x Help
    Replies: 3
    Last Post: Feb 13, 2012, 1:57 PM
  4. Replies: 3
    Last Post: May 11, 2010, 10:36 AM
  5. [CLOSED] [1.0] Combo box add event runtime
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 21, 2010, 11:03 AM

Posting Permissions