I'm having trouble accessing switches in a grid column. I want to loop through them and toggle them on after clicking a toolbar button.
The click event is working. But getting 'undefined' on 'switchInstance ':
Column with switches code:
.Columns(columns =>
{
columns.Bound(p => p.Exempt).Width(100).Filterable(ftb => ftb.Multi(true)).Sortable(false).ClientTemplate(
"<input class='exemptSwitch' id='exemptSwitch' \\#if (Exempt) { \\# checked='checked' \\# } \\# type='checkbox' />");
})
Toolbar button code:
.ToolBar(toolBar =>
{
toolBar.Custom()
.Name("EnableAllFiltered")
.Text("Enable All Filtered")
.IconClass("k-icon k-i-play")
;
})
Click event code:
$(function () {
$(".k-grid-ExemptAllFiltered", "#SubscriberGrid").on("click", function (e) { <--- click of custom grid header toolbar button
$("#SubscriberGrid .exemptSwitch").each(function () {
var switchInstance = $(this).data("kendoSwitch");
switchInstance.enable(true);
});
});
Any assistance would be greatly appreciated!
Jon
Hi,
Could you confirm the necessary requirements to get the Form validation working please?
We create a new project using the Telerik asp.net core 3.1 web MVC project, standard layout choices.
Create a model class with [Required] annotated fields.
Create a new "Create" view with the Form for the model, copying code from the Form examples and from the documentation but the onblur validation never fires?
Do we need jquery-validate files?
What are we missing that triggers the validation?
Thanks,
Daniel.

I want to send an anti forgery token AND additional data in my update ajax call of my grid.
Here is my update
.Update(u => u.Url("/Index/?handler=Update").Data("additionalInfo") I have a Razor Pages project where I have 2 widgets on my UI; a custom widget (non telerik) and the telerik grid. Currently they are supplied their data by the model passed in on my OnGet() method. I cannot get the Grid Persistence (all the grid options) to work with local binding. Is it possible?
Whenever I attempt the setOptions() I get an error because the url path it tries to go to doesnt exist. I am not using Ajax binding for read so there is no read methods. Is it possible to stop this behavior? I would like to use the data in my model only and not have to post another request to get all of the same data.
Grid:
@(Html.Kendo().Grid<MyClass>(Model.Data) .Name("Grid") .Columns(columns => { //column list }) .Sortable() .Groupable() .ToolBar(toolBar => { toolBar.Save(); toolBar.Search(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) .Scrollable() .Filterable(ftb => ftb.Mode(GridFilterMode.Row)) .Reorderable(r => r.Columns(true)) .Resizable(r => r.Columns(true)) .ColumnMenu() .Pageable(pageable => pageable .Refresh(true)) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Model(model => { //mode fields }) .Update(u => u.Url("/Index/?handler=Update").Data("forgeryToken")) ) )
And here is how I try to get and set my grid options:
$("#gridStateSave").click(function (e) { var grid = $("#Grid").data("kendoGrid"); e.preventDefault(); localStorage["kendo-grid-options"] = kendo.stringify(grid.getOptions()); }); $("#gridLoadState").click(function (e) { e.preventDefault(); var options = localStorage["kendo-grid-options"]; if (options) { grid.setOptions(JSON.parse(options)); } });
With the code like this, all of the options are applied to my grid, however the data disappears which i assume to be because the setOptions() calls a read method and since there is no read method configured on my grid, errors and returns no data.I would like to prevent having to call a duplicate request to get the same data that is already in my grids datasource.
Any help is appreciated.
My company pays a lot of money to download CODE not use NuGet. If I login with a valid paid for login, I should get ALL we paid for. Instead, you now force me to use NuGet even though I download a zip file. This is wrong.
I have been downloading and using Telerik products since before Kendo, way back in 2010 and this change upsets me. Please reconsider and give us back what we paid for - files. In other words, like it used to be. There was ZERO reason to change this. Keep customers happy or you may lose them!

How can we POST form data from a step?
I just see GET with all forms data.

Hello,
I need obtain the eventDate value from the current open event.
I try this ...but doesn't work:
function refresh() { var timeline = $("#Timeline").data("kendoTimeline"); var date = new Date(timeline.dataItem.EventDate);
....}Regards,
Santi.

I have an odd behavior with the splitter. I'd like to know how to get this to work. For some reason the Label is aligned to the left off the page. How do I get around this behavior?
Splitter Definition:
@(Html.Kendo().Splitter() .Name("splitter") .HtmlAttributes(new { style = "height: 150px;" }) .Panes(panes => { panes.Add() .HtmlAttributes(new { id = "top_pane" }) .Collapsible(true) .Content(@<p>@Html.Partial("_SplitterWorkPanel1")</p>); panes.Add() .HtmlAttributes(new { id = "bottom_pane" }) .Collapsible(true) .Content(@<p>@Html.Partial("_SplitterWorkPanel2")</p>); }))
Partial Views (both are the same):
@{ Layout = null; }<div class="row"> <label class="col-form-label">Date Range</label></div><div class="row" style="margin-top: 5px;"> <label class="col-form-label">Status</label></div>

The code places the PDF Viewer in a partial razor view. I am using Zurb Foundation to display a modal dialog. The PDF viewer displays on the modal dialog. I am using the OnRender to change the PDF viewer to fit to width. What I am seeing is the first time that the PDF file is rendered, the PDF file is smaller than subsequent renders while the modal dialog is open.
For example, on the first render of the dialog, I see the following( see attachment FirstRender.png).
While the modal dialog is displayed, I change to another zoom selection and back to fit to width. This render does appear to fit to width (see attachment SecondRender.png). Repeating the switch between the selections and back to fit to width yields the same result where fit to width seems to work (see attachment SecondRender.png).
Is there some way I can get the first render to fit to width like the subsequent renders?
