This question is locked. New answers and comments are not allowed.
I am new to MVC3 and ASP.NET. While working with the validation, for some reason the telerik drop down does not fire the onSuccess function which check for validation. However onError function works just fine. Any solution?
I have several text boxes they work just fine.
Here is my dropdownbox
@Html.Telerik.DropDownListFor(Function(model) model.OrderEntityID).BindTo(New SelectList(ViewBag.OrderEntities, "OrderEntityID", "Name")).ClientEvents(Sub(events) events.OnChange("orderEntityID_OnChange"))
Here is onSUccess function
function onSuccess(error) { // 'this' is the form element
var container = error.data("unobtrusiveContainer"),
replace = $.parseJSON(container.attr("data-valmsg-replace"));
if (container) {
container.addClass("field-validation-valid").removeClass("field-validation-error");
error.removeData("unobtrusiveContainer");
if (replace) {
container.empty();
}
}
}
I have several text boxes they work just fine.
Here is my dropdownbox
@Html.Telerik.DropDownListFor(Function(model) model.OrderEntityID).BindTo(New SelectList(ViewBag.OrderEntities, "OrderEntityID", "Name")).ClientEvents(Sub(events) events.OnChange("orderEntityID_OnChange"))
Here is onSUccess function
function onSuccess(error) { // 'this' is the form element
var container = error.data("unobtrusiveContainer"),
replace = $.parseJSON(container.attr("data-valmsg-replace"));
if (container) {
container.addClass("field-validation-valid").removeClass("field-validation-error");
error.removeData("unobtrusiveContainer");
if (replace) {
container.empty();
}
}
}