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>
11 Answers, 1 is accepted
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
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
For ASP..NET MVC, you can use the UI for ASP..NET MVC wrappers to resolve the problem.
Regards,
Alex Gyoshev
Telerik
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
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
>
I hope this information helps.
Regards,
Sebastian
Telerik
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.
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