I have a case where i need to dynamically clone the switch control and use it.
Im able to clone the switch but the script still refers to the original control .
Tried changing the id and name properties but still not able to achieve it .
Can anyone let me know how to do it .(FYI im not using mobileswitch)
Thanks in advance.

Hi,
I have a business requirement to be displayed 100+ bar charts with lines on one page itself while hitting the page.
Can you please help to do that dynamically? I'm very much new to this Kendo UI control.
--
Thanks
Ramesh

I want the sum of two columns to be added to another column in the kendo grid. Now it is showing that NaN when I use ClientTemplate whereas in the case of ClientGroupColumnTemplate shows the correct result. In my case, I want the result in another column instead of a group column any help?
.Columns(c =>
{ c.Bound(p => p.field1).Title("F1");
c.Bound(p => p.field2).Title("F2");
c.Bound(p => p.Total).Title("Total").ClientTemplate("#=calculate(data)#");
})
<script>
function calculate(data) {
field1 + p.field2;
return result;
</script>

Hello,
Could someone provide sample code for export Grid data to excel? below is the requirement:
1. This is MVC project
2. Kendo Grid with many pages in the View.
3. button located in the view but not located in the toolbar section of the Grid.
4. When click button, all Grid data (not just View data) should export to excel file.
Thanks.

Hello,
I try to get dataSource from my MVC project but got syntax error. Could someone tell me what's wrong? Thanks.
Action method on MyController:
public JsonResult Position_Read()
{
var entity = new PositionViewModel
{
POS_ID = "10000",
POS_TYPE="INTER",
CREATE_DT = DateTime.Now
};
return Json(entity);
}
JavaScript in View:
<script>
function GetServerSourceData() {
var ds = new kendo.data.DataSource({
type: "odata",
transport: {
read: "/MySite/MyController/Position_Read"
},
schema: {
model: {
fields: {
POS_ID: { type: "string" },
POS_TYPE: { type: "string" }
CREATE_DT: { type: "date" },
}
}
}
});
return ds;
}
</script>

I have added custom validation on the grid for multiple columns. It's working as expected. The only problem I am facing is that the tooltip position is not pointing to the current cell, it is pointing to different cells in the same row for all columns. How can I fix it?
columns.Bound(config => config.X).Title("X").HeaderHtmlAttributes(new { @class = "grid-headercustom" }).
ClientTemplate("#if(data.X == 1)" + "{#<span>Y</span>#}" + "else{#<span>N</span>#}#").
HtmlAttributes(new { @class = "grid-rowcustom" }).HtmlAttributes(new { style = "font-size:12px" }).Filterable(ftb => ftb.Enabled(false));$.extend(true, kendo.ui.validator, {
rules: {
RateV: function (input, params) {
if (input.is("[name='X']")) {
var grid = $("#grid-pricefeedconfiguration").data("kendoGrid");
var row = input.closest("tr");
var dataItem = grid.dataItem(row);
if (dataItem.X == true && dataItem.Y <= 0) {
input.attr("data-RateV-msg", "X must be greater than zero when the Y is ticked");
return false;
}
}
return true;
}
},
messages: {
RateV: function (input) {
// return the message text
return input.attr("data-val-X");
}
}
});
})(jQuery, kendo);I have a checkbox in a grid that I want to conditionally disable. What I have below technically hides the checkbox (haven't figured out how to conditionally 'disable') but you can still click in the box and the checkbox will appear even if it does not meet the condition:
@(Html.Kendo().Grid<SomeUI.Areas.UVL.Models.SomePOModel>
().Name("SomePOgrid")
.Columns(columns =>
{
columns.Bound(p => p.forceClose).Title("Force Close")
.ClientTemplate("#if(status == 'Pending'){# <input id='forceClose' value='#=forceClose#' class='k-checkbox' type='checkbox' checked='checked'/> #}#")
.Width(170).HtmlAttributes(new { style = "text-align:center;" });
})
Hello,
I am using Kendo for Asp.Net MVC. With an ImageBrowser on the Editor control, the name returned from the server (which is different from the file name uploaded) is respected, but for the FileBrowser, the returned name is ignored. How does on get this to work?
<PackageReferenceInclude="Telerik.UI.for.AspNet.Core"Version="2021.2.616"/>
I have aKendo Grid, I have added custom validation on multiple columns. It's working as expected for all the columns, though it's not working for the columns of the type checkbox. It shows the error message even if the checkbox is unchecked.
columns.Bound(config => config.X).Title("X").HeaderHtmlAttributes(new { @class = "grid-headercustom" }).
ClientTemplate("#if(data.X == 1)" + "{#<span>Y</span>#}" + "else{#<span>N</span>#}#").
HtmlAttributes(new { @class = "grid-rowcustom" }).HtmlAttributes(new { style = "font-size:12px" }).Filterable(ftb => ftb.Enabled(false));
$.extend(true, kendo.ui.validator, {
rules: {
RateV: function (input, params) {
if (input.is("[name='X']")) {
var grid = $("#grid-pricefeedconfiguration").data("kendoGrid");
var row = input.closest("tr");
var dataItem = grid.dataItem(row);
if (dataItem.X == true && dataItem.Y <= 0) {
input.attr("data-RateV-msg", "X must be greater than zero when the Y is ticked");
return false;
}
}
return true;
}
},
messages: {
RateV: function (input) {
// return the message text
return input.attr("data-val-X");
}
}
});
})(jQuery, kendo);
Hello everyone,
We have a Kendo Grid for user registration with an input field for first name, last name, etc.. We've encountered a problem with our users whose last name is "Null". When we attempt to add a new record to the grid, using a kendo popup editor, and enter null in the last name field it will automatically clear it. We are then able to retype it and the value will be retained in the input box while we continue editing. However, after the record is saved the kendo grid will once again clear the field.
Is there anyway we can work around this issue? Thanks for reading.