5 Answers, 1 is accepted
You can loop your items hierarchically and build RadDocument in the same way as in flat scenario.
Greetings,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Can i get an example ?
Thanks.
You should not create a document inside document. You simply need to loop on your items hierarchically and create the document with appropriate table.
Kind regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Hi,
In Kendo hierarchy grid, loading appears while print the grid.
Can you please help in removing it.
Jquery for print,
function printGrid(GridId, colToHide) { debugger
var dataSource = $("#grid").data("kendoGrid").dataSource;
dataSource.pageSize(dataSource.total());
// Declaring Variables.
var SCRIPT_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var cssUrl = "/(S(ww2x3porzqtoymwdvlhl3q5q))/Content/PrintSite.css";
var grid2 = $("#grid").data("kendoGrid");
var i;
for (i = 0; i <= grid2.tbody.find('>tr.k-master-row').length-1; i++) {
var parentId = grid2._data[i].ID;
var childgridId = "#grid_"+parentId ;
var gridView = $(childgridId).data("kendoGrid");
if(gridView!=null)
gridView.hideColumn(7);
}
var gridElement = $("#grid");
win = window.open(
'', '', 'width=800, height=500, scrollbars = 1'),
doc = win.document.open(),
htmlStart =
'<!DOCTYPE html>' +
'<html>' +
'<head>' +
'<meta charset="utf-8" />' +
'<title>'+title+'</title>' +
'<link href=' + cssUrl + ' rel="stylesheet" /> ' +
'<style>' +
'html { font: 11pt sans-serif; overflow: -moz-scrollbars-vertical; overflow-y: scroll;}' +
'.k-grid, .k-grid-content { height: auto !important; }' +
'.k-grid-toolbar, .k-grid-pager > .k-link, .k-pager-info, .k-pager-wrap.k-grid-pager.k-widget { display: none; }' +
'.k-grid-content {overflow-y: hidden}' +
'td {padding: 10px;}' +
'</style>' +
'</head>' +
'<body>',
htmlEnd =
'</body>' +
'</html>';
var headerGridElement = $("#ReportDetailsGrid");
var sectionPara = '<h4 style="margin:10px 0px 20px 5px;">' + "Field Collected Data" + '</h4>'
var div = '<div style= "height:10px;"></div>'
var fieldData = gridElement.clone()[0].outerHTML
// Code used for removing the Jquery present inside the HTML.
// On removing the script tag only child band will be retrived successfully.
while (SCRIPT_REGEX.test(fieldData)) {
fieldData = fieldData.replace(SCRIPT_REGEX,
"");
}
doc.write(htmlStart + sectionPara + headerGridElement.clone()[0].outerHTML + div +
fieldData+ htmlEnd);
doc.close();
win.print();
var dataSource1 = $("#grid").data("kendoGrid").dataSource;
dataSource1.pageSize(5);
var gridView = $("#grid").data("kendoGrid");
gridView.showColumn(2);
}
Attached the image while print.
How to remove/make invisible loading text.
Since the question seems to not be related to RadGridView for Silverlight, I would suggest you to post it in the respective forum category.
Regards,
Dimitrina
Telerik