Telerik Forums
Kendo UI for jQuery Forum
1 answer
7 views

I have a form on which there is checkbox control. For some reason the kendo validator always considers the checkbox a required field and considers a non-checked state as invalid. How can I get the validator to ignore the checkbox? As you can see, the field, IsTerminated is not marked required.



<form id="frmEmployee" method="post">
    <div class="control-grid">
        <div class="col-1-label">
            @Html.LabelFor(m => m.Id, "Employee Id: ")
        </div>
        <div class="col-1-control">
            @Html.Kendo().TextBoxFor(m => m.Id).HtmlAttributes(new { @readonly = "", @required = "", @validationMessage = "Id is required" })
        </div>

        <div class="col-2-label">
            @Html.LabelFor(m => m.FirstName, "First Name: ")
        </div>
        <div class="col-2-control">
            @Html.Kendo().TextBoxFor(m => m.FirstName).HtmlAttributes(new { @required = "", @validationMessage = "First Name is required" })
        </div>

        <div class="col-3-label">
            @Html.LabelFor(m => m.LastName, "Last Name: ")
        </div>
        <div class="col-3-control">
            @Html.Kendo().TextBoxFor(m => m.LastName).HtmlAttributes(new { @required = "", @validationMessage = "Last Name is required" })
        </div>

        <div class="col-1-label">
            @Html.LabelFor(m => m.MiddleName, "Middle Name: ")
        </div>
        <div class="col-1-control">
            @Html.Kendo().TextBoxFor(m => m.MiddleName)
        </div>

        <div class="col-2-label">
            @Html.LabelFor(m => m.PreferredName, "Preferred Name: ")
        </div>
        <div class="col-2-control">
            @Html.Kendo().TextBoxFor(m => m.PreferredName)
        </div>

        <div class="col-3-label">
            @Html.LabelFor(m => m.Email, "Email: ")
        </div>
        <div class="col-3-control">
            @Html.Kendo().TextBoxFor(m => m.Email).HtmlAttributes(new { @required = "", @validationMessage = "Email is required" })
        </div>

        <div class="col-1-label">
            @Html.LabelFor(m => m.HireDate, "Hire Date: ")
        </div>
        <div class="col-1-control">
            @Html.Kendo().DatePickerFor(m => m.HireDate).HtmlAttributes(new { @required = "", @validationMessage = "Hire Date is required" })
        </div>

        <div class="col-2-label">
            @Html.LabelFor(m => m.IsTerminated, "Terminated: ")
        </div>
        <div class="col-2-control">
            @Html.Kendo().CheckBoxFor(m => m.IsTerminated)
        </div>

        <div class="col-3-label">
            @Html.LabelFor(m => m.TerminationDate, "Termination Date: ")
        </div>
        <div class="col-3-control">
            @Html.Kendo().DatePickerFor(m => m.TerminationDate)
        </div>

        <div style="display: none;">
            @Html.Kendo().DatePickerFor(m => m.CreatedDate)
        </div>
    </div>
</form>

 

On page load I have:


    $(document).ready(function ()
    {
        $("#frmEmployee").kendoValidator();
    });

 

And before I submit my data to the server I have a check:


let validator = $('#frmEmployee').kendoValidator().data('kendoValidator');

if (validator.validate())
{
   // ...
}

validator.validate() always returns false if IsTerminated is not checked. IsTerminated is a non-nullable bool.

Martin
Telerik team
 answered on 08 May 2024
1 answer
74 views

(Before getting into the article, I apologize for my poor English skills.)

Hello! you guys always help me.

I need to create checkboxes using kendoCheckBoxGroup function in specific fields of KendoForm.

However, it should be limited to 4 per line, not listed in one line.

Expressing it pictorially is as follows:

(Note, the text that goes into the field will vary in length.)

 

And, the code I'm working on is below.

var items = [
        {value: "item1", label: "Item 1"},
        {value: "item2", label: "Item 2"},
        {value: "item3", label: "Item 3"},
        ...
        {value: "item14", label: "Item 14"},
    ];

$('#checkBoxField').kendoCheckBoxGroup({
    items: items,
    layout: "horizontal"
});

How can I modify it to make it work the way I want?

Thank you as always for your kindness!

Zornitsa
Telerik team
 answered on 22 Aug 2023
1 answer
54 views

This example not works as expected:

https://dojo.telerik.com/ESAQEsip/2

It should only select: Red and Green.

Isn't it?

It's the same if I write the value of the input field by hand: value="Red"

Docs:

https://docs.telerik.com/kendo-ui/framework/mvvm/bindings/checked#binding-lists-of-checkboxes-to-arrays

Many thanks

Paolo
Top achievements
Rank 2
Iron
 answered on 25 Jul 2023
1 answer
176 views

Hello Team,

I have run the FastPass on the kendo control present at the below URL and found the a11y issues.

https://demos.telerik.com/kendo-ui/dropdowntree/checkboxes

https://demos.telerik.com/kendo-ui/dropdowntree/index

Please check the below images

On fixing one of the issues(adding aria-label attr) shown in the above image, new a11y issues are coming as shown in the below image. 

On fixing the above one as well, new a11y issues are coming,

Please let me know how can we fix this problem?

 

Thanks & Regards

Karan

Karan
Top achievements
Rank 1
 updated question on 04 Apr 2023
1 answer
60 views

https://www.telerik.com/kendo-angular-ui/components/dropdowns/multiselect/checkboxes/ (looking to implement something like this but with Kendo UI for jQuery)

I am looking to implement a multi-select with checkboxes. I found kendo provides an option for Angular, but I am looking to see if this is provided with Kendo UI for jQuery, if so, any documentation I can look into?

I am also looking to add, a Select All checkbox which will select all options if checked, if unchecked, need to unselect all the options. Is there any built-in functionality to achieve this?

 

Neli
Telerik team
 answered on 24 Mar 2023
1 answer
272 views

i saw from the Kendo UI for Jquery Kendo Grid page is able to achieve the indetermindate state for checkbox but i cant seems to find how do i do it?

Georgi
Telerik team
 answered on 06 Jul 2022
1 answer
53 views

In this example:

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

 

a semicolon is automatically added to the end of the label of a checkbox.

 

Is there anyway to remove the semicolon?

Martin
Telerik team
 answered on 15 Feb 2022
1 answer
716 views

I have a grid with multiple selection with checkboxes.  I need to be able to deselect the checkbox on a single row programatically.  I am able to turn off the row selection class using 

$(row).removeClass("k-state-selected");

but I have so far been unable to uncheck the corresponding checkbox.  

Thanks in advance.

Eric Katz

Martin
Telerik team
 answered on 14 Oct 2021
1 answer
186 views

Is there a provision to make kendo radio & checkbox controls to take browser default styles?
Upper control has kendo styling & below checkbox has default browser styling, and this will be different for different browsers. Can we make kendo checkbox inherit the browser style.

 

Georgi Denchev
Telerik team
 answered on 16 Aug 2021
1 answer
99 views

Hi, 

Need customization of  Checkboxes on focus need to add arrow showing below options. 

Currently having close ( X ) icon. Need to be add down arrow as per attachment design.

Please assist. 

Neli
Telerik team
 answered on 07 Jul 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?