Hi,
We have reviewed Silverlight RadGridview print demo application made available in your web site. We want it to prompt with print preview dialog.
Our requirement is:
Immediately after clicking the print button, the corresponding print preview dialog should be displayed to guide the user choose options.
Invoice Printing:
RadGridview control's tohtml method is used to move the data from grid to another page but we need to move outside RadGridview control values also like company name, Customer Address, Company logo and we need to print in well designed format without using Telerik report tool.
It will be helpful if you explain with example, probably in the demo source for “RadGridview”
Thnaks in Advance,
Kannan.S
7 Answers, 1 is accepted
I believe the ToHTMl method is intended for more general scenarios and will not be in much help for your task .
Rendering your data ( including data not in the RadGridView) seems more like a task for a logic external to the UI respectively to the RadGridView. TheToHTML method lacks the power to format data e.g. in an invoice printing scenario beyond what is visible in RadGridView.
The custom formatting you mention in your requirements will definitely require something custom written ( this in case you do not reconsider using Telerik Reporting) .
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
You can use the grid Exporting event and PrintToHtml() or Silverlight 4 printing.
All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
PrintToHtml exports the contents of the RadGridView to HTML, inserts the generated HTML in the HTML host, then coerces the browser to print the newly-generated HTML element. However, this has been discovered to only work reliably in Internet Explorer, and not Out-Of-Browser.
The suggested way to print in Silverlight 4 is to use the PrintDocument class. You can find a short guide on it here.
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I'm using radgridview along with GridViewColourColumn and I need to print it. It can be printed by using grid.Print(), but the issue is it's not printing with styles used i.e. the control ColorEditorColorBox used in cellelement is not getting printed. Please provide any solution to print the data along with this colour control.
Thanks
Swati
Actually, Print() is a legacy method. In the latest version of our controls you should use RadDocument as described in this online example. However, in order to print a custom content in the column,you will have to subscribe to the ElementExporting event of the RadGridView. Inside it, when you are exporting a cell, you could change the value to be exported. You can check this help article for a reference.
Regards,
Yoan
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>