Set Checkbox Value

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    14 posts
    Member since:
    Jun 2012

    Posted 27 Oct Link to this post

    Is there any way to declare the value of a checkbox? Currently the value is always 'true'.

    <input name="AppleYN" class="k-checkbox form-control" id="AppleYN" type="checkbox" value="true">

    I would like to specify the values for check box lists:

    <input name="AppleYN" class="k-checkbox form-control" id="AppleYN" type="checkbox" value="21">

    <input name="BananaYN" class="k-checkbox form-control" id="BananaYN" type="checkbox" value="22">

    <input name="OrangeYN" class="k-checkbox form-control" id="OrangleYN" type="checkbox" value="23">

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 31 Oct Link to this post

    Hello Daniel,

    I am not sure if I correctly understand you requirement. Generally, the input value is defined via its value attribute and the Kendo UI specific classes just style the inputs.

    You may also find useful the following article which is related to binding radiobuttons in an MVC scenario - http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/radiobutton/overview

    Regards,
    Danail Vasilev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top