Hi guys,
I'm able to perform cell validation by providing a list of acceptable values. This provides the user with a dropdown to select a suitable value. This is great, but I need to extend it so that it is mandatory when the value in another cell is provided, but must be blank if the other cell is not populated. For example:
Is it possible to achieve this?

Hello Team,
I have a following scenario.
<script id="OuterTemplate" type="text/x-kendo-template">
# for (var i = 0; i < data.length; i++) { #
<a href="\\#'" data-bind="click: onOuterLinkClick" data-index="#: i #">#: data[i].displayText #</a>
#}#
#= renderMyTemp(data[i].innerLinks) #
</script>
<script id="InnerTemplate" type="text/x-kendo-template">
# for (var j = 0; j < data.length; j++) { #
<a href="\\#" data-bind="click: onInnerLinkClick"
data-index="#: j #">#: data[j].displayText #</a>
# } #
</script>
<script type="text/javascript" >
function renderMyTemp(data) {
return kendo.Template.compile($('#InnerTemplate').html())(data);
}
</script>
And my data which is getting passed to OuterTemplate, looks like following:
var data = [
{
"displayText" : "outer link abc",
"onOuterLinkClick" : () => {},
"innerLinks" : [
{
"displayText" : "inner link abc1",
"onInnerLinkClick" : () => {}
},
{
"displayText" : "inner link abc2",
"onInnerLinkClick" : () => {}
}
]
},
{
"displayText" : "outer link def",
"onOuterLinkClick" : () => {},
"innerLinks" : [
{
"displayText" : "inner link def1",
"onInnerLinkClick" : () => {}
},
{
"displayText" : "inner link def2",
"onInnerLinkClick" : () => {}
}
]
}
]
I pass the data as follows:
var template = kendo.template($('#OuterTemplate').html());
template(data);
Question : In above code, inside outerTemplate, onOuterLinkClick binding is working properly. But inside InnerTemplate, onInnerLinkClick binding is not working. can you please tell me, what's the correct way to do it?
Thanks & Rergards
Karan
Hi,
I'm using client-side filtering after the kendo grid is rendered and I wanted to export to excel the filtered data in some situations.
I tried using $("#reportResultsGrid").data("kendoGrid").dataSource.view() and that gives me the current object of what I want to export to excel, but I can't figure out how to use the saveAsExcel() method to export what's in that current view() in the kendo grid. I can console log it, but I just can't figure out how to export the filtered data.
My goal originally was to create a custom button in excel toolbar and use that to export the data but, now I'm just using a stand alone button at the top of the page for testing purposes. Ideally I would like to create a button in the excel toolbar that just exports whatever is in the current kendo grid view.
Below is as far as I've figured out.
$('#testSaver').on("click", function () {
$("#reportResultsGrid").data("kendoGrid").dataSource.view()
console.log(clientSideFilterData);
});
Hi,
In our application users can upload an excel file, this data is then displayed in a Kendo spreadsheet (JQuery) control. The templates we use to insert the data have 6 blank rows at the top:
Row 7 is the header row and the data starts at row 8.
Using the built in 'Export' function on the Kendo spreadsheet we are able to export the data. What we want to be able to do is export the data in the same format it was imported. i.e. with the 6 blank rows at the top and the header row on row 7.
I have played around with sheet.insertRow(0); but this leaves 0's in the numeric columns and also blanks out the header row.
Do you have any other suggestions?
Thanks
Ian
I am trying to use Kendo Grid in a view.
In the main index.html I have reference for the required css and js files:
<link href="kendo-phcc/styles/kendo.mobile.all.min.css" rel="stylesheet"><script src="kendo-phcc/js/jquery.min.js"></script><script src="kendo-phcc/js/kendo.mobile.min.js"></script>I have a list view in the main index.html and each list item refers to a separate external view which is defined in it's own html file.
In the view html file I have this :
<div data-role="view" data-init="initGrid" data-title="Restaurants" id="restaurantsView"> <div id="grid"></div></div><script> function initGrid() { //This alert was displayed alert("Dummy"); $("#grid").kendoGrid({ columns: [{ field: "Attribute", title: "Attribute" }, { field: "Value", title: "Value" }], dataSource: { data: [{ Attribute: "Mall/Location", Value: "City Center/The Mall/Pearl" }, { Attribute: "ShopName", Value: "Gold Gourmet" }] } }); }; </script>I have seen this forum and made sure that I made no such mistakes such as repeating jquery reference or not including required files.
http://stackoverflow.com/questions/32917273/uncaught-typeerror-kendogrid-is-not-a-function
But still I have the error
Could you please help me out in this problem.
The app was created from Telerik Platform so it already had the required css and js files included.
I also tried creating a separate folder and manually adding all the required files from the Kendo UI Professional zip that I downloaded from my account.
But still I have the same issue.
I think this is a very basic question but I am just starting with kendo and Telerik so I would really appreciate your help
Is it possible to get hold of the text that gets generated when we do grid.saveAsExcel(), so that we can remove certain html tags from the output before the excel (xlsx file) gets generated.
We need to remove the html tags from the excel that gets generated.
I am attaching a sample excel file so that you can see what (html tags) i intend to remove
This does not work: https://dojo.telerik.com/UNIJebUR
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2021.3.1207/styles/kendo.default-v2.min.css"/>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2021.3.1207/js/kendo.all.min.js"></script>
</head>
<body>
<div id="appbar"></div>
<script>
$("#appbar").kendoAppBar({
items: [
{
type: "contentItem",
template: "<span><input /><span>"
},
{
type: "spacer"
},
{
type: "contentItem",
template: "<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>"
},
]
});
</script>
</body>
</html>

Is it possible to get this format to work with a password field? For example, if I wanted to be able to add hyphens to a private number but still keep it masked with asterisks so that as the user typed, it would appear as shown in the image?

I've tried to get this working using this aspnetmvc-ajax sample code from telerik found here.
https://demos.telerik.com/kendo-ui/grid/grouppaging
I'm using jquery ajax restful api for the remote data endpoint and I am returning the response in the exact format as shown in the above example but it doesn't work.
After the grid loads, an "undefined" is displayed as the first row in the grid despite the data from the ajax data call returning the data in the exact same format as shown in the above example.
I also added the code for the sample into my project and I tried a local data source in order to rule out jquery ajax as remote api being the problem with the same response data format as the sample code to see if the server side group paging is anyway dependent on the datasource.type being aspnetmvc. In this case I also get the same error as seen in my jquery ajax grid with remote group paging.
Has anyone been able to get group paging for a grid using a custom function for the transport read (jquery ajax) configuration?
Can anyone confirm whether it should work for this use case? And does anyone have an example?
Thanks in advance and appreciate your help.
Best,
Don