This question is locked. New answers and comments are not allowed.
I have partial view that displays basic address fields that is included multiple times on the same host page: once for billing and once for shipping address. This works as expected for the first instance on the page but bindinf event fails to fire for the second instance.
I suspect its because the client events have the same name but I'm not sure how to avoid that. I've been through all the samples and doco but havent found anything helpful. Help.
I suspect its because the client events have the same name but I'm not sure how to avoid that. I've been through all the samples and doco but havent found anything helpful. Help.
@(Html.Telerik().ComboBox()
.Name("AjaxComboBox")
.AutoFill(true)
.HtmlAttributes(new { id = "AjaxComboBox_wrapper" , style = "width: 250px; float: left;" }).DropDownHtmlAttributes(new { style = "height: 200px" })
.DataBinding(binding => binding.Ajax()
.Select("_FilteringAjax", "Customer")
.Delay(400)
.Cache(true))
.Filterable(filtering =>
{
filtering.FilterMode(AutoCompleteFilterMode.Contains);
filtering.MinimumChars(3);
})
.HighlightFirstMatch(false)
.ClientEvents(events => events
.OnDataBinding("onComboBoxDataBinding")
.OnChange("onComboBoxChange"))
)
<
span
class
=
"field-validation-error"
> *</
span
>
@Html.ValidationMessageFor(model => model.ZipPostalCode)
</
td
>
</
tr
>
}
function
onComboBoxDataBinding(e) {
alert(
"binding"
);
e.data = $.extend({}, e.data, { filterMode: 1 });
}