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

[Solved] Dropdown box validation

1 Answer 43 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.
Sabuj
Top achievements
Rank 1
Sabuj asked on 21 Feb 2012, 05:20 PM
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();
            }
        }
    }

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 23 Feb 2012, 12:58 PM
Hi Sabuj,

 I just answered your support ticket on the same subject. As I noted there, the code excerpts look OK, so we will need a sample project to be able to investigate further.

Regards,
Georgi Tunev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ComboBox
Asked by
Sabuj
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or