dwarak kanniah
Top achievements
Rank 1
dwarak kanniah
asked on 11 Jan 2010, 06:28 AM
Hi.
I am Creating radgrid dynamically with gridhyperlinkcolumns .I am able to create grid dynamically but when i export to excel the header is blank.Is there anyway to solve this issue.
Is there any option to disable the rad grid skin while printing alone.....
Thanks
Dwarak.K
I am Creating radgrid dynamically with gridhyperlinkcolumns .I am able to create grid dynamically but when i export to excel the header is blank.Is there anyway to solve this issue.
Is there any option to disable the rad grid skin while printing alone.....
Thanks
Dwarak.K
3 Answers, 1 is accepted
0
Hello Dwarak,
When exporting invisible RadGrid you should first show it (and rebind) otherwise it won't work as expected.
Word/Excel export (HTML-based)
As to the second question - you could use the following code-library - just don't put the skins in the output window:
Print RadGrid contents
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
When exporting invisible RadGrid you should first show it (and rebind) otherwise it won't work as expected.
Word/Excel export (HTML-based)
As to the second question - you could use the following code-library - just don't put the skins in the output window:
Print RadGrid contents
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
dwarak kanniah
Top achievements
Rank 1
answered on 11 Jan 2010, 09:41 AM
Hi Daniel........
Regarding to print,I have following queries.....
1)The code for printing the contents of datagrid works fine in internet explorer but it is not printing in
Firefox...........
2)If I enable client settings scrolling and resizing to true,and if i choose 50 items in a page it prints the items
in only in the first page,but it leaves the second page,.Is there any option in such a way that both client settings are enabled and also mulitiple pages is printed.......
Thanks
Dwarak.K
0
Hello Dwarak,
outerHTML works in Internet Explorer only. Please try the following:
2. You should disable the paging as demonstrated in the attached project.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
outerHTML works in Internet Explorer only. Please try the following:
<script type="text/javascript"> function getOuterHTML(object) { var element; if (!object) return null; element = document.createElement("div"); element.appendChild(object.cloneNode(true)); return element.innerHTML; } function PrintRadGrid() { var previewWnd = window.open('about:blank', '', '', false); var sh = '<%= ClientScript.GetWebResourceUrl(radGrid1.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",radGrid1.Skin)) %>'; var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>"; var htmlcontent = styleStr + "<body>" + getOuterHTML($find('<%= radGrid1.ClientID %>').get_element()) + "</body></html>"; previewWnd.document.open(); previewWnd.document.write(htmlcontent); previewWnd.document.close(); previewWnd.print(); previewWnd.close(); } </script>2. You should disable the paging as demonstrated in the attached project.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.