This is a migrated thread and some comments may be shown as answers.

[Solved] Select Combobox Value And Change Other Combobox DataList

0 Answers 47 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Santo
Top achievements
Rank 1
Santo asked on 09 Mar 2011, 01:17 AM
Hi All,

   I want to ask a solution about how to change combobox datalist from other combobox selected event.
The problem is like this:
1.  Have a Product Type combobox that contain product type data.  This combobox data fill when the page was load. (done)
                <%: Html.LabelFor(model => model.product_category) %>
                <%= Html.Telerik().DropDownList()
                    .Name("Product_Category")
                    .DataBinding(binding => binding.Ajax().Select("_GetProductCategoryList", "Invoice"))
                    .HtmlAttributes(new { style = string.Format("width: {0}px;", 200) })
                    .ClientEvents(events => events
                        .OnChange("
categoryChanges"))
                %>


2. When i select one of the value, it's run into client javascript  categoryChanges.  The question is how to  bind the new data using client side request into other combobox.  Then client side script:
    function categoryChanges(e) {
        var customerComboBox = $("#Customer").data("tComboBox");
        customerComboBox.dataBind(jQuery.parseJSON($.getJSON("custom",
            {
                text: "test"
            })));
    }
 
I check with firebug, the custom page is returning the result correctly.  Appreciate any help.

Thanks,
Santo
Tags
ComboBox
Asked by
Santo
Top achievements
Rank 1
Share this question
or