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

[Solved] Combobox Reload problem

0 Answers 48 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.
panja
Top achievements
Rank 1
panja asked on 10 Jun 2011, 10:33 AM
i used Html.Telerik().ComboBoxFor when use reload() function. In combobox always appear latest value in combobox how can i deleted it ?
here is what i set for ComboBoxFor

.Name(

"CustomerBranchId")

 

 

.DataBinding(binding => binding.Ajax().Select(

"_GetBranchId", "CustomerProfile"))

 

 

.AutoFill(

true)

 

 

.HtmlAttributes(

new {style = "width: 80px;top: 7px"})

 

 

.HighlightFirstMatch(

true)

 

 

.ClientEvents(events => { events.OnLoad(

"comboOnLoad");

 

 

events.OnDataBinding(

"onBranchIdDataBinding");

 

 

events.OnOpen(

"onReloadCustomerBranchId");

 

 

events.OnChange(

"onCustomerBranchIdChange");})

 

 

.Render();%>

and here is javascript that i wrote

 

 

$(

 

"#CustomerId").change(function (e) {

 

 

CustomerBranchIdValue = $(

 

"#CustomerBranchId").data("tComboBox").value();

 

 

CustomerBrahchText = $(

 

"#CustomerBranchId").data("tComboBox").text();

 

 

$(

 

"#CustomerBranchId").data("tComboBox").reload();

 

 

$(

 

"#CustomerBranchId").data("tComboBox").value("");

 

 

$(

 

"#CustomerBranchId").data("tComboBox").text("");

 

 

});

Tags
ComboBox
Asked by
panja
Top achievements
Rank 1
Share this question
or