Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.0K+ 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.

Aaron
Top achievements
Rank 1
Iron
Iron
 answered on 27 Aug 2024
0 answers
136 views

I am trying my first steps using jQuery and Kendo in WordPress.

It would be really helpful to get some advice on the following:

  1. I do I install Kendo UI in a WordPress site?
  2. I do I install Kendo UI just in a plugin?

Thanks!

Maurizio
Top achievements
Rank 1
 updated question on 26 Aug 2024
1 answer
86 views

I am trying to virtualize a Kendo UI JQuery list view with local data.

I also made my own Dojo here but it doesn't work. The problem with mine is that it is still creating all of the items, not just the first 5. Any idea how to fix this?

Georgi Denchev
Telerik team
 answered on 26 Aug 2024
0 answers
101 views

Description: We have encountered an issue with the Kendo UI FileManager component related to drag-and-drop uploads and the navigation bar.

Issue Details:

  1. Duplicate Uploads on Drag-and-Drop: When performing a drag-and-drop upload, the file(s) are uploaded twice. This occurs because the API is called twice during the drag-and-drop operation, resulting in duplicate uploads.
  2. Navigation Path Issue: The navigation bar at the top does not function as expected. When clicking a navigation path link, the FileManager navigates back to the home directory instead of the intended path. However, the navigation tree on the left works correctly.

Steps to Reproduce:

  1. Open the Kendo UI FileManager.
  2. Drag and drop a file into the FileManager interface.
  3. Observe the file being uploaded twice.
  4. Click on any path link in the navigation bar at the top.
  5. Observe that it navigates to the home directory instead of the intended path.

Expected Behavior:

  1. The file(s) should be uploaded only once during drag-and-drop.
  2. The navigation bar should correctly navigate to the intended path, similar to the navigation tree on the left.

Attached Video: A video demonstrating both issues have been attached for reference. It shows how the file is uploaded twice during drag-and-drop and how the navigation bar fails to navigate properly.

Attached Source Code: I have also attached my JavaScript and controller upload source code for reference. This will provide additional context for the implementation and may help in identifying the root cause of the issues.

Reference:
https://demos.telerik.com/kendo-ui/filemanager/index
Afandi
Top achievements
Rank 1
Iron
Veteran
 updated question on 23 Aug 2024
1 answer
58 views
In Kendo UI 2016.2.504, the Spreadsheet does not support setting the number of rows and columns, and the settings have no effect after being applied
Peter Milchev
Telerik team
 answered on 22 Aug 2024
1 answer
59 views
I have a grid where user input causes multiple rows to be updated through a complex formula. Currently, I'm using dataItem.set("column", value) to do the update. Unfortunately, this is taking about 20 seconds to complete. Is there a way to speed this up but also not lose the current grid view. For example, If the user scrolled down to record 50, it needs to stay there after the update. No rows are being added or deleted, just the values are changing.
Martin
Telerik team
 answered on 21 Aug 2024
1 answer
72 views

Hi,

I have the Scheduler (Day View), I need to show my time slots (I will get it from API) in the header.

 

I need to show them in the header :

 

 

This API Response :

 

Neli
Telerik team
 answered on 21 Aug 2024
0 answers
105 views

Hello,

I have a kendo grid created from an HTML table like this:

<div class="content">
    <table id='k-grid'>
        <thead>
            <tr>
                <th data-field="my_value1">Title 1</th>
                <th data-field="my_value2">Title 2</th>
            </tr>
        </thead>
    </table>
</div>

I need to update its toolbar at runtime with setOptions in another file and I can't modify the grid setup.
So I did :


const options = kendoGrid.getOptions();
if (!options.toolbar) {
    options.toolbar = [];
}
options.toolbar.push(
    { template: `<div class='vr'></div>` },
    { template: `<select id='my-selector'></select>` }
);
kendoGrid.setOptions({ toolbar: options.toolbar });

 

But when I refresh the Grid using setOptions, the columns  titles are lost and take the value of the data-field attributes.
I know this is expected behavior with reference to the setOptions documentation and the init from Table - documentation.

My goal is to make updating the toolbar completely transparent to creating the grid in order to reuse it on any table without breaking it.

How can I keep the data in the original HTML table and apply it to the newly created grid with setOptions please?

Théodore
Top achievements
Rank 1
 updated question on 20 Aug 2024
5 answers
2.5K+ views

This is my code

1. I want to export master & its related child record to excel and its working fine if i didnt use grouping. but whereas if i add grouping, then its not working. 

2. Also how to remove the header in child records while exporting to excel.

Expecting your help.

Code
Top achievements
Rank 1
Iron
 updated answer on 20 Aug 2024
1 answer
83 views
Does the DropDownTree support virtualization and valuemappers like the DropDownList does? I have a tree with 500 nested items on 3 levels (parent, child, grandchild). 
Nikolay
Telerik team
 answered on 19 Aug 2024
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?