In documentation it says about ModalView:
"The widget can be open when any mobile navigational widget (listview, button, tabstrip, etc.) is tapped. To do so, the navigational widget should have data-rel="modalview" and href attribute pointing to the ModalView's element id set (prefixed with #, like an anchor)."
I've tried to use the "data-rel" attribute inside a listview template, but it gives error about invalid template.
Example:
<script type="text/x-kendo-template" id="MyListViewTemplate"> <a data-rel="modalview" href="#MyModalViewId">Open</a> </script>
Can you please give example how to use it properly from listview?
Hi Telerik team.
I've got a grid bound on a server datasource with virtual scrolling and I would like to keep the selected row when the user scrolls.
I've already found a solution on the forum but unfortunately, it doesn't seems to work... Here is my code (with Kendo UI 2014.3.1411):
$("#grdResults").kendoGrid({
dataBound: onDataBound,
change: onSelectedItemChange,
dataSource: {
........
scrollable: {
virtual: true
},
selectable: true,
........
function onSelectedItemChange(arg) {
var selectedRow = arg.sender.dataItem(arg.sender.select());
$("#selectedRow").val(selectedRow.uid);
}
function onDataBound(e) {
if ($("#selectedRow").val()) {
row = $("#grdResults").data().kendoGrid.table.find('tr[data-uid="' + $("#selectedRow").val() + '"]');
//row = $(this.tbody).find("tr[data-uid='" + $("#selectedRow").val() + "']")
if ($(row).length > 0) {
$(row).addClass("k-state-selected");
}
}
}
Could you tell me what I've done wrong ?
Thanks for your answer.
Regards,
Cédric

@(Html.Kendo().MultiSelectFor(m => m.ReportCriteria.ProductClassList) .Name("ReportCriteria.ProductClassList") .DataTextField("ProductClassDescription") .DataValueField("ProductClassCode") .Events(e => e.Select("onSelect")) .AutoBind(true) .DataSource(source => { source.Read(read => { read.Action("ProductClassList", "Dashboard") .Data("sendProductClassText"); }); source.ServerFiltering(true); }))function onSelect(e) { var allSelect = ["All"]; var multi = $("#ReportCriteria_ProductClassList").data("kendoMultiSelect"); var dataItem = this.dataSource.view()[e.item.index()]; alert(dataItem.Value); if (dataItem.Value == "All") { multi.value(["All"]); } if (multi.value().indexOf("All") > -1) { var values = multi.value().slice(); values = $.grep(values, function (a) { return $.inArray(a, allSelect) == -1; }); multi.dataSource.filter({}); multi.value(values); }}Hi,
I am trying to build a custom validator to validate 3 fields: Min < Most Likely < Max.
I've written this custom validator, but for some reason, most of the time, the value of "Max" is being read as null and no error messages are displayed. Is there something wrong with my code:
http://dojo.telerik.com/@bhaidar/uvOfA
Thanks,
Bilal
Hi, all
I have tried to display json data in kendo treelist..but my code displaying only parent class data like nodes class only not child class i want to display items class too please short out my problem.
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/treelist/local-data-binding">
<style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.material.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.dataviz.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.dataviz.material.min.css" />
<script src="http://cdn.kendostatic.com/2015.1.408/js/jquery.min.js"></script>
<script src="http://cdn.kendostatic.com/2015.1.408/js/kendo.all.min.js"></script>
</head>
<body>
<div id="example">
<div id="treelist"></div>
<script>
$(document).ready(function () {
var dataSource = new kendo.data.TreeListDataSource({
data: [
{"node": {
"lastModifiedBy": "admin",
"name": "55254b6e1e000021005873a2",
"lastModified": "2015-04-08T15:38:22.199Z",
"items": [{
"lastModifiedBy": "55254b931e00001e005873aa",
"name": "Image_0174.jpg",
"path": "/companies/55254b6e1e000021005873a2/Image_0174.jpg",
"size": 627042,
"lastModified": "2015-04-09T07:16:33.516Z",
"description": null,
"versions": [{
"id": "bed1e4ba-1cbc-475b-8a41-1d944b412ffe",
"timeStamp": "2015-04-09T07:16:33.517Z"
}, {
"id": "49570167-2d0e-4e19-9ff3-8be5a8aecb71",
"timeStamp": "2015-04-09T07:16:33.542Z"
}],
"encoding": "",
"mimeType": "image/jpeg",
"lastVersion": {
"id": "49570167-2d0e-4e19-9ff3-8be5a8aecb71",
"timeStamp": "2015-04-09T07:16:33.542Z"
},
"type": "File"
}, {
"lastModifiedBy": "55254eab1e000021005873bc",
"name": "testo2",
"lastModified": "2015-04-08T15:58:46.252Z",
"items": [{
"lastModifiedBy": "55254b931e00001e005873aa",
"name": "newfile",
"path": "/companies/55254b6e1e000021005873a2/testo2/newfile",
"size": 808076,
"lastModified": "2015-04-08T16:37:04.117Z",
"description": null,
"versions": [{
"id": "d267441d-cd9b-4271-a94d-71d789483c23",
"timeStamp": "2015-04-08T16:37:04.119Z"
}, {
"id": "b7acfa4a-dcbc-46da-a15f-7bb3767b2faa",
"timeStamp": "2015-04-08T16:37:04.156Z"
}],
"encoding": "",
"mimeType": "image/jpeg",
"lastVersion": {
"id": "b7acfa4a-dcbc-46da-a15f-7bb3767b2faa",
"timeStamp": "2015-04-08T16:37:04.156Z"
},
"type": "File"
}],
"hasItems": true,
"type": "Folder"
}],
"hasItems": true,
"type": "Folder"
},parentId: null}
],
schema: {
model: {
id: "node.lastModifiedBy",
fields: {
id: { field: "node.lastModifiedBy.items", type: "number" }
},
expanded: true
}
}
});
$("#treelist").kendoTreeList({
dataSource: dataSource,
height: 540,
columns: [
{ field: "node.lastModifiedBy" },
{ field: "node.name" },
{ field: "node.lastModified" },
{ field: "node.items.lastModifiedBy" }
]
});
});
</script>
</div>
</body>
</html>
I have attached my output..