
I want to bind dynamic data to a validation list - is there an easy way to do this? The data will be an array of objects, with id/value pairs and in the dropdown list I'd like to show the value, but store the ID.
I'm using (where valueList is an array which I want to be databound) :
validation {
dataType: "list",
showButton: true,
comparerType: "list",
from: valueList,
allowNulls: true,
type: "reject"
}

Hi,
I'm exporting my KendoGrid to PDF with a Template. I need to pass variables to the template like this:
template: kendo.template($("#kendo-grid-pdf-template").html())({ CUSTOMERNAME: cust.FullName, CUSTOMERID: cust.Id})
This is the template:
<script id="kendo-grid-pdf-template" type="text/x-kendo-template"> <div class="page-template-pdf"> <div class="header-pdf"> #: CUSTOMERNAME #, Customer ID: #: CUSTOMERID# </div> </div></script>
The Problem:
PDF generation fails because "pageNum" and "totalPages" are undefined. This only happens when I pass my custom parameters. How do I pass the pageNum and totalPages parameters that are required? It work when I pass it like this:
template: kendo.template($("#kendo-grid-pdf-template").html())({ CUSTOMERNAME: cust.FullName, CUSTOMERID: cust.Id, pageNum: "?", totalPages: "?"})
but where do I get the right values?

<div style="position:relative;" id="temp-container"> <div style="position:absolute;left:0px;top:50px;width:100%;background:url('http://127.0.0.1:8000/images/arrow1.png') no-repeat;height:50px;"></div> <div style="position:absolute;left:26%;top:50px;font-size:28px;">Number</div> <div style="position:absolute;left:50%;margin-left:-50px;width:100px;top:90px;font-size:28px;">Original</div> <div style="position:absolute;right:0px;width:33%;top:50px;">Date1</div> <div style="position:absolute;right:0px;width:33%;top:80px;">Date2</div> <div style="position:absolute;right:0px;width:33%;top:110px;">Date3</div> <div style="position:absolute;left:0px;right:0px;top:150px;background:url('http://127.0.0.1:8000/images/arrow3.png') no-repeat;height:50px;background-size:100% 100%;"></div> <table cellpadding="6px" cellspacing="3px" border="0px" style="width:100%;position:relative;top:200px;"> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> <tr> <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;"> <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div> </td> <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td> <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td> </tr> </table> </div>setTimeout(function () { kendo.drawing.drawDOM($("#temp-container")) .then(function (group) { // Render the result as a PDF file return kendo.drawing.exportPDF(group, { paperSize: "A4", multiPage: true, margin: { left: "0cm", top: "1cm", right: "0cm", bottom: "1cm" } }); }) .done(function (data) { // Save the PDF file kendo.saveAs({ dataURI: data, fileName: "HR-Dashboard.pdf", proxyURL: "http://demos.telerik.com/kendo-ui/service/export" }); }); }, 1000);Hi All,
This is my click event code for search image of a template, but the click event doesn't fired. Is there something missing here? or is there a better way to do this? TIA
columns[{
title: "Name",
field: "Name",
width: 225,
template: "#=Name# <span class='k-icon k-i-close' id='temp' style='float: right;' click='test()'></span>",
.....
}],​
function test(){
alert("Hello");
}
Hello!
I was wondering if there is a way to ensure, especially on mobile, that when a user taps into the editor for the first time and starts typing that the first letter is automatically capitalized? I don't need each word capitalized, just the very first letter typed in the editor.
Thanks!


Hi,
I'm trying to follow the example illustrated in http://dojo.telerik.com/OwUCE/44 about adding a custom button in the toolbar part of the Scheduler.
However i noticed that if you resize the browser window multiple times, the button (hence the "dataBound" event gets fired multiple times) therefore
we get a lot of new buttons. Is there a way to force that this button is only created ONCE?
I have a server side service that returns json that looks like [{appID:"11"},{appID:"22"}]
In this case the text and values are the same.
When I am doing a call to "value" function I see that a data is fetched from the server.
var combobox = $("#combobox").data("kendoComboBox");
combobox.value("11");
Why a call to server is required in case that the text and value are the same?
Is there a way to set the value without a need to fetch data from the server?
thanks,
Evyatar