This question is locked. New answers and comments are not allowed.
Hi,
I have an issue with telrik's dropdownlistfor helper. If I use this helper, does not validate on the client site, it will post then validate.
When I use MVC's standard html.dropdownlistfor helper all clientside validation holds true, and prevents a user from submitting.
Is this a known bug, or am I doing something wrong? I've tried passing an instance of the model and converting the model's property to be nullable. No matter what, client-side validation is never triggered.
My view:
@Html.Telerik().DropDownListFor(model => model.BusinessUnitId).BindTo((SelectList)ViewData["BusinessUnits"]).HtmlAttributes(new { style = "width:400px; white-space:nowrap;" }).DropDownHtmlAttributes(new { style = "width:400px; white-space:nowrap;" })
My Model:
public class ContractViewModel
{
[Required]
public int BusinessUnitId { get; set; }
}
I am also using the latest version of the MVC controls.
Thanks in advance!
I have an issue with telrik's dropdownlistfor helper. If I use this helper, does not validate on the client site, it will post then validate.
When I use MVC's standard html.dropdownlistfor helper all clientside validation holds true, and prevents a user from submitting.
Is this a known bug, or am I doing something wrong? I've tried passing an instance of the model and converting the model's property to be nullable. No matter what, client-side validation is never triggered.
My view:
@Html.Telerik().DropDownListFor(model => model.BusinessUnitId).BindTo((SelectList)ViewData["BusinessUnits"]).HtmlAttributes(new { style = "width:400px; white-space:nowrap;" }).DropDownHtmlAttributes(new { style = "width:400px; white-space:nowrap;" })
My Model:
public class ContractViewModel
{
[Required]
public int BusinessUnitId { get; set; }
}
I am also using the latest version of the MVC controls.
Thanks in advance!