Hello,
I'm using the following code to export a grid with a few hundred rows:
kendo.drawing.drawDOM($("#resultsGrid"),
{
allPages: true,
avoidLinks: true,
paperSize: "A4",
multiPage: true,
landscape: true,
margin: { top: "4cm", right: "1cm", bottom: "1cm", left: "1cm" },
repeatHeaders: true
}).then(function (documentgroup)
{
kendo.drawing.pdf.saveAs(documentgroup, "myfile", "pdf"));
});
The pdf settings on the grid look like this:
pdf: {
allPages: true,
repeatHeaders: true
},
The grid exports fine but does not repeat the headers on each page. They are only present on the first page. Any ideas what would prevent "repeatHeaders: true" from repeating the headers on every page of the exported PDF file?
Thanks,
Jonesy
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.common-material.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.material.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.material.mobile.min.css"
/>
<
script
src
=
"https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js"
></
script
>
<
script
src
=
"https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"example"
>
<
div
id
=
"editor"
rows
=
"10"
cols
=
"30"
style
=
"height:400px"
>
<
br
/>
<
br
/>
<
p
contenteditable
=
"false"
><
span
contenteditable
=
"false"
>THIS WILL BE REMOVED ( NESTED CONTENT EDITABLE=FALSE)</
span
></
p
>
<
p
>If you press Enter key when focus on this text the above will be removed.</
p
>
</
div
>
<
script
>
$(document).ready(function() {
$("#editor").kendoEditor({
immutables: true,
tools: ["viewHtml"]
});
});
</
script
>
</
div
>
</
body
>
</
html
>
<style>
#filter-toolbar
{
display: inline-block;
padding: 5px;
}
</style>
<script>
$("#department-grid .k-grid-toolbar").prepend($("#filter-toolbar"));
</script>
<div id="department-grid"></div>
<
div
id
=
"filter-toolbar"
>
<
label
>Company: </
label
>
@Html.DropDownList("CompanyId", Model.CompanySelectList)
</
div
>
<
div
id
=
"department-grid"
></
div
>
Hello,
I am trying to implement a complex grid that has 4 functions defined, on dataBound, columnMenuInit, and 2 on change. We noticed that, when using setOptions/getOptions from local storage, the functionality of our column menu is lost (an error about t[e] not being defined pops up).
Now, I have researched and apparently the JSON.stringify we have to apply before storing does away with the functions, this is, they are lost when setting the options to local storage: however, I was trying to implement a workaround I saw while researching, where basically the function was stored separately, and added after parsing the rest of the options before loading them to the grid again.
My problem now is that the function is getting added to the parsed options object as what I believe is an Unicode string (the representation of it on Chrome dev tools comes up as a string instead of a function). The error thrown when trying to JSON.parse it is that there's a "u" token at position 1, so that's what leads me to think in this way.
My question is: is there any way I can assign the function stored separately on local storage to grid options before applying them to the grid, in order to not lose any functionality? I would be happy just storing and re-adding the columnMenu function (I guess I could extend this to the other ones if it's possible, later on). What would be your advice in this case?
Thank you!
The className specified is applied on A tag but not on the right inner SPAN tag
try this code on dojo , see the attached screenshot
<!DOCTYPE html>
<
html
>
<
head
>
<
base
href
=
"http://demos.telerik.com/kendo-ui/grid/custom-command"
>
<
style
>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</
style
>
<
title
></
title
>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.common.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.blueopal.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.blueopal.mobile.min.css"
/>
<
script
src
=
"https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js"
></
script
>
<
script
src
=
"https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
script
src
=
"../content/shared/js/people.js"
></
script
>
<
div
id
=
"example"
>
<
div
id
=
"grid"
></
div
>
<
div
id
=
"details"
></
div
>
<
script
>
var wnd,
detailsTemplate;
$(document).ready(function () {
var grid = $("#grid").kendoGrid({
dataSource: {
pageSize: 20,
data: createRandomData(50)
},
pageable: true,
height: 550,
columns: [
{ field: "FirstName", title: "First Name", width: "140px" },
{ field: "LastName", title: "Last Name", width: "140px" },
{ field: "Title" },
{ command: { text: "View Details", click: showDetails, className : 'k-icon k-i-copy' }, title: " ", width: "180px" }]
}).data("kendoGrid");
wnd = $("#details")
.kendoWindow({
title: "Customer Details",
modal: true,
visible: false,
resizable: false,
width: 300
}).data("kendoWindow");
detailsTemplate = kendo.template($("#template").html());
});
function showDetails(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
wnd.content(detailsTemplate(dataItem));
wnd.center().open();
}
</
script
>
<
script
type
=
"text/x-kendo-template"
id
=
"template"
>
<
div
id
=
"details-container"
>
<
h2
>#= FirstName # #= LastName #</
h2
>
<
em
>#= Title #</
em
>
<
dl
>
<
dt
>City: #= City #</
dt
>
<
dt
>Birth Date: #= kendo.toString(BirthDate, "MM/dd/yyyy") #</
dt
>
</
dl
>
</
div
>
</
script
>
<
style
type
=
"text/css"
>
#details-container
{
padding: 10px;
}
#details-container h2
{
margin: 0;
}
#details-container em
{
color: #8c8c8c;
}
#details-container dt
{
margin:0;
display: inline;
}
</
style
>
</
div
>
</
body
>
</
html
>
Hi,
I am developing a MVC Project with kendo ui. One of the requirement is to filter blank values in grid columns. The filter option should be a part of existing filter options present with column headers. How can we implement the same?
How can we customize kendo grid filter options "Is empty","Is not empty" etc like the code which is mentioned below.
.Filterable(filter => filter.Mode(GridFilterMode.Menu).Extra(false)
.Operators(oper => oper.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
.Contains("Contains")
.StartsWith("Starts with")
)))
Hello,
can anyone tell me why the dropdown not fits when filtering("contains") ??
1.
@(Html.Kendo().DropDownListFor(m => m.Planstelle).BindTo(Model.AvailablePlanstellen)
2.
.Filter("contains")
3.
.HtmlAttributes(new { style = "width: 100%; margin-right: 10px" }))
this makes me crazy ^^
Best Regards