This is a migrated thread and some comments may be shown as answers.

RadGridView Print problem

7 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kanna
Top achievements
Rank 1
Kanna asked on 15 Mar 2010, 08:58 AM

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

Sort by
0
Pavel Pavlov
Telerik team
answered on 18 Mar 2010, 01:54 PM
Hello Kanna,

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.
0
Rajiv Jain
Top achievements
Rank 1
answered on 13 Apr 2010, 08:43 PM

I am trying to print the data from the grid with some formatting but not in grid format.
So there a way to print formatted data from the Grid? Can you give us some example? Thx

RJ
0
Vlad
Telerik team
answered on 14 Apr 2010, 07:08 AM
Hi,

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.
0
Marc Roussel
Top achievements
Rank 2
answered on 28 May 2010, 10:51 AM
Can you explain what PrintToHtml does because I just tried your demo and it does absolutely nothing !
0
Yavor Georgiev
Telerik team
answered on 28 May 2010, 02:26 PM
Hi Marc Roussel,

 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.

All the best,
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.
0
swati
Top achievements
Rank 1
answered on 03 Feb 2014, 12:07 PM
Hi,
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

0
Yoan
Telerik team
answered on 03 Feb 2014, 12:40 PM
Hello 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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
GridView
Asked by
Kanna
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Rajiv Jain
Top achievements
Rank 1
Vlad
Telerik team
Marc Roussel
Top achievements
Rank 2
Yavor Georgiev
Telerik team
swati
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or