Checkbox does not work in 2014.3.1119

12 posts, 1 answers
  1. Georgy
    Georgy avatar
    2 posts
    Member since:
    Dec 2014

    Posted 16 Dec 2014 Link to this post

    Hi,

    I've migrated from version 2014.2.1008  to version 2014.3.1119. 

    I have problem with checkbox (class="k-checkbox"). The next example works fine with 2014.2.1008, but does not work with 2014.3.1119.

    Can you help me?

    Regards,
    Georgy

    <!DOCTYPE html>
    <html><head>   
    <script src="http://cdn.kendostatic.com/2014.3.1119/js/jquery.min.js"></script>
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.common.min.css" />
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.default.min.css" />   
    <script src="http://cdn.kendostatic.com/2014.3.1119/js/kendo.all.min.js"></script>
    </head>
    <body>
    Checkbox1: <input class="k-checkbox" id="Checkbox1" type="checkbox"><br>
    Checkbox2: <input class="k-checkbox" id="Checkbox2" type="checkbox"><br>
    Checkbox3: <input class="k-checkbox" id="Checkbox3" type="checkbox">
    </body></html>






  2. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 17 Dec 2014 Link to this post

    Hi Georgy,

    I think the information from the following section of the documentation will help you address the issue at hand. Furthermore, you may also update your account information as it does not indicate that you have access to the 2014.2.1008 version of Kendo UI (either via trial or commercial package) - let me know if I am missing something obvious.

    Regards,
    Sebastian
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Georgy
    Georgy avatar
    2 posts
    Member since:
    Dec 2014

    Posted 17 Dec 2014 in reply to Sebastian Link to this post

    Thanks Sebastian, 

    I've corected with recomendation from section. Now works. Thanks!

    The previos mentioned version is 2014.2.1008 trial.

    <!DOCTYPE html>
    <html><head>   
    <script src="http://cdn.kendostatic.com/2014.3.1119/js/jquery.min.js"></script>
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.common.min.css" />
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.default.min.css" />   
    <script src="http://cdn.kendostatic.com/2014.3.1119/js/kendo.all.min.js"></script>
    </head>
    <body>
    Checkbox1: <input class="k-checkbox" id="Checkbox1" type="checkbox">
    <label class="k-checkbox-label" for="Checkbox1">Hello</label>
    </body></html>



    2014.2.1008
  5. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 19 Mar 2015 Link to this post

    Unfortunately this does mean that Kendo checkboxes don't work with plain Asp Mvc. They use a hidden input after the checkbox input and before the label.
  6. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 21 Mar 2015 Link to this post

    Hello Anthony,

    For ASP..NET MVC, you can use the UI for ASP..NET MVC wrappers to resolve the problem.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. John
    John avatar
    5 posts
    Member since:
    Jun 2014

    Posted 26 Aug 2015 in reply to Sebastian Link to this post

    Is this issue fixed, as I have the problem today with the latest MVC wrapper ?
  8. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 26 Aug 2015 Link to this post

    Hello John,

     

    the thread is quite old, so the problem you are facing is unlikely to be related to it. Please open a new support thread - we will help you further. 

     

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    Sep 2015

    Posted 28 Oct 2015 in reply to John Link to this post

    The problem I have noticed is that the k-checkbox apparently depends on an element with k-checkbox-label after it. Without the k-checkbox-label after it, there's no styled checkbox plus the original checkbox is now hidden.

     

    To get the Kendo-styled checkbox, one needs to use this combination:

     

    <input type="checkbox" class="k-checkbox" />
     
    <label class="k-checkbox-label">My styled checkbox</label>

  10. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 28 Oct 2015 Link to this post

    It would be nice if you could use the checkbox in asp.net mvc without using the dll. We presently don't use anything from the dll and would prefer to keep that separation
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 30 Oct 2015 Link to this post

    Anthony, as you can see from the documentation article I linked below, you can use the input/label combination for checkboxes directly in the html of the page, without referencing it from the Kendo.Mvc assembly via the server wrapper.

    I hope this information helps.

    Regards,
    Sebastian
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  12. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 30 Oct 2015 in reply to Sebastian Link to this post

    Sorry, I can see I wasn't clear enough

    We presently use ms sql, oracle, a few tiers, less, typescript and then asp.mvc and kendo ui, then there's other dlls from other companies etc. We don't use the kendo mvc dll at all at present and we'd rather not bring it in just to ​give a checkbox a better appearance.

     

     Our asp mvc code is plain, so a checkbox will look something like this:

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

    This is the normal syntax for asp mvc. Behind the scenes this renders:

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

     

    So if we then follow this with a label it wont work because there's a hidden input between the checkbox and the label. This is just how asp mvc code works so there's not much we can do about this, we could use your dll or create our own custom checkbox but bear in mind all of your asp.net mvc customers will have the same issue

     

    It would be better if kendo code could cope with the hidden input between the label and the input box, it's invisible so just ignore it.

  13. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 30 Oct 2015 Link to this post

    Thanks for the additional explanation, I see what you mean now, Anthony.

    Since this is not supported presently by the Kendo UI MVC checkbox Html helper, what you can do is to submit a request on our feedback portal to be evaluated for future releases, based on the interest and votes it gets.

    For now your option is to replace the standard MVC checkbox Html helper declaration with inline html input and label definition in the MVC view, if applicable, as discussed below in this forum thread.

    Kind regards,
    Sebastian
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready