This question is locked. New answers and comments are not allowed.
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
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