Completed
Last Updated: 10 Jun 2021 06:44 by ADMIN
Anthony
Created on: 30 Oct 2015 11:39
Category: UI for ASP.NET MVC
Type: Feature Request
5
Make checkboxes easier to use with asp.net mvc
At present to get the nice kendo checkboxes you need a checkbox followed by a label, you can't do this in asp.net mvc because

@Html.CheckBoxFor(x => x.IsEnabled)

renders as:

<input id="IsEnabled" type="checkbox" value="true" name="IsEnabled">
 <input type="hidden" value="false" name="IsEnabled">

The solution is to use the kendo mvc dll, or possibly just make your own, but it would be much easier if the kendo ui code could just ignore the hidden input, or if the two controls could be linked via 'for', 'data-for', 'data-whatever'
1 comment
ADMIN
Viktor Tachev
Posted on: 10 Jun 2021 06:44

Hello,

With the current rendering when using the CheckBox component it will render a native checkbox element and the styling will be applied to it. In addition you can still have label showing informational text about the CheckBox.

Take a look at the demo below that shows how the CheckBox component works:

https://demos.telerik.com/aspnet-mvc/checkbox

 

Regards,
Viktor Tachev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.