This question is locked. New answers and comments are not allowed.
I'm following the example to add a 'null' option to a drop down list from here. Eg. I have something like this to add the null option
In my case the DropDownList is for a required model property. Client-side validation isn't preventing people from submitting the form. How would I go about adding the client side validation myself?
Thanks,
Russ
<% var list = new SelectList(Model.Products, "ProductID", "ProductName").ToList(); list.Insert(0, new SelectListItem { Text = "Select option...", Value = "-1" }); %> <%= Html.Telerik().DropDownListFor(model => model.PersonId) .SelectedIndex(0) .BindTo(list) %>In my case the DropDownList is for a required model property. Client-side validation isn't preventing people from submitting the form. How would I go about adding the client side validation myself?
Thanks,
Russ