Hi,
I'd like to export the grid to PDF, and need to add column headers on each page.
I was able to apply the page template (page header and footer), but couldn't add the column headers on the grid on each page..
Also, I'd like to change font size when it exports to PDF. how can I change the font size?
Thank you,
// Export handler
$("#export").on("click", function () {
var grid = $("#grid").data("kendoGrid");
grid.hideColumn(3);
grid.columns[0].width = "60px";
grid.columns[1].width = "60px";
grid.refresh();
kendo.drawing.drawDOM("#grid", {
forcePageBreak: ".page-break",
paperSize: "Legal",
landscape: true,
margin: {
left : "2mm",
top : "30mm",
right : "2mm",
bottom : "40mm"
},
template: $("#page-template").html()
})
.then(function (group) {
kendo.drawing.pdf.saveAs(group, "CFCReport.pdf");
var grid = $("#grid").data("kendoGrid");
grid.showColumn(3);
grid.refresh();
});
I'm using a kendo date picker in a jsp binded form (using spring + hibernate). When i try tu submitt the form i get this errros: "Field error in object 'doctorVisit' on field 'date': rejected value [9/25/2018 8:00 AM]" and
"Failed to convert property value of type 'java.lang.String' to required type 'java.time.LocalDateTime' for property 'date'". The binded property Is of LocalDateTime and has formmating set to be Just the same as the date picker formmat. Down under is my Jsp from and Kendo script
<%@ page contentType="text/html;charset=UTF-8" language="java" %><html><head> <link href="/Kstyles/kendo.common.min.css" rel="stylesheet" /> <link rel="stylesheet" href="/Kstyles/kendo.common.min.css" /> <link rel="stylesheet" href="/Kstyles/kendo.default.min.css" /> <script src="/Kjs/jquery.min.js"></script> <script src="/Kjs/kendo.all.min.js"></script> <title>Appointment</title></head><body><form:form modelAttribute="visit" method="POST" > ${spec}:<form:select path="doctor" multiple="false"> <c:forEach var="doctor" items="${doctors}"> <form:option value="${doctor}" label="${doctor.surname}"/> </c:forEach></form:select> Date and time:<form:input id="timePicker" path="date" /> Cause: <form:select path="cause" multiple="false"> <c:forEach var="cause" items="${causes}"> <form:option value="${cause}" label="${cause.description}"/> </c:forEach></form:select> <input type="submit" value="Submit"/></form:form><script> (function($) { var dateTimePicker = kendo.ui.DateTimePicker; var MyWidget = dateTimePicker.extend({ init: function(element, options) { dateTimePicker.fn.init.call(this, element, options); }, startTime: function(startTime) { var timeViewOptions = this.timeView.options; timeViewOptions.min = startTime; this.timeView.setOptions(timeViewOptions); }, endTime: function(endTime) { var timeViewOptions = this.timeView.options; timeViewOptions.max = endTime; this.timeView.setOptions(timeViewOptions); }, options: { name: "CustomDateTimePicker", interval: 20, } }); kendo.ui.plugin(MyWidget); })(jQuery); var datePicker = $("#timePicker").kendoCustomDateTimePicker().data("kendoCustomDateTimePicker"); datePicker.startTime("07:00"); datePicker.endTime("20:00");</script></body></html>
Hi,
We recently upgraded to latest version (2018.2.620) from old one (2016.2.504). On most places all widgets are ok, but in this specific place, my treeList widget doesn't display icons on command buttons (command: ["edit", 'destroy']). When I manually overwrite current (latest) kendo.common.min.css on the server, icons are displayed, but wrong icon is displayed on edit button (chevron up I think). Also, on the same column, I have some classes applied on attributes, but headerAttributes are applied while attributes are not.
This is code for the column:
{
title: "edit",
attributes: {
'class': 'c-centered'
},
headerAttributes: {
'class': 'k-header c-centered'
},
command: ["edit", 'destroy'],
width: 135,
locked: true
}

Hello,
I have a strange situation where I instantiate TreeView and its Pager, but when I hit pager to switch to the page 2, for example, pager reacts, and changes page, description which items are displayed (13-14 of 14), but TreeView contents don't follow and first page remains displayed. Pager DataSource is set to pageSize:12.
Only thing that I do differently from your example is that I initially setDataSource to default empty data source, then on click event on the form, I use it again to set different data source.
I also tried setting data, total under schema manually, but no success.
Here is my code extract for instantiation and change..
function handleTemplateSelector() {
var listView = $("#listView").data("kendoListView");
var pagi = $("#pager").data("kendoPager");
pagi.setDataSource(vm.getNewDatasource());
listView.setDataSource(vm.getNewDatasource());
}
Any suggestions would be welcomed.
Thanks and regards,
Vedad
Hi,
Juste need help to modify the font and colors of all items in a filter for grid widget in mode="row"
Thanks in advance,
François-Régis
Hi!
Is it possible to pass additional data from my grid to the popup window beside the bound object?
@(Html.Kendo().Grid<GazoraAllasModels>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Oraallas).Title("Óraállás");
columns.Bound(c => c.LeolvasasDatum).Title("Leolvasás dátuma");
})
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("AddOraallas").AdditionalViewData(new { maxOra = "=#MaxOra()#" }))
I would like to pass data of a return value of javascript function as you can see (MaxOra()
On the editable template cshtml file has @ViewData["maxOra"] but the value is the string of "=#MaxOra#" and not the value. The cshtml starts with these lines, so I cannot pass this value in model:
@model MyProject.Models.MyProjectModels
@using Kendo.Mvc.UI
@ViewData["maxOra"]
This value cannot be in the model class. I really need to pass it as additional data.
Thanks
Hi,
how can I change the position of the Crosshair Tooltip below the chart?
I found https://www.telerik.com/forums/understanding-valueaxis-crosshair and in the dojo is used
valueAxes: [{crosshair: {tooltip: {position:"left",
But I can not find crosshair.tooltip.position in docs
I'm interested in a chart like amchart, see https://www.amcharts.com/demos/candlestick-chart/
Best regards,
Peter