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.
(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!
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
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
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?
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?
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?
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
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.
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.