This is a migrated thread and some comments may be shown as answers.

Checkbox does not work in 2014.3.1119

11 Answers 351 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Georgy
Top achievements
Rank 1
Georgy asked on 16 Dec 2014, 09:40 PM
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>






11 Answers, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 17 Dec 2014, 11:36 AM
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!
 
0
Georgy
Top achievements
Rank 1
answered on 17 Dec 2014, 01:23 PM
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
0
Anthony
Top achievements
Rank 1
answered on 19 Mar 2015, 10:04 AM
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.
0
Alex Gyoshev
Telerik team
answered on 21 Mar 2015, 06:04 AM
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!
 
0
John
Top achievements
Rank 2
answered on 26 Aug 2015, 02:00 PM
Is this issue fixed, as I have the problem today with the latest MVC wrapper ?
0
Petyo
Telerik team
answered on 26 Aug 2015, 03:27 PM

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!
 
0
Jonathan
Top achievements
Rank 1
answered on 28 Oct 2015, 05:44 PM

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>

0
Anthony
Top achievements
Rank 1
answered on 28 Oct 2015, 06:23 PM
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
0
Sebastian
Telerik team
answered on 30 Oct 2015, 08:46 AM
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!
 
0
Anthony
Top achievements
Rank 1
answered on 30 Oct 2015, 09:03 AM

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.

0
Sebastian
Telerik team
answered on 30 Oct 2015, 10:31 AM
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!
 
Tags
General Discussions
Asked by
Georgy
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Georgy
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Alex Gyoshev
Telerik team
John
Top achievements
Rank 2
Petyo
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or