Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


I want to print the datagrid in silverlight4. Datagrid has 21 columns.

I am trying to print through PrintDocument() but it is taking the screenshot.

I want to print only data in datagrid or datagrid to PDF.

Please help. Thanks
Posted
Comments
[no name] 21-Sep-13 8:46am    
"I want to print", okay so go ahead and do that. Not sure what it is that you need help with. You have not asked any kind of a question or demonstrated any kind of a problem with the code that you have written.
Trushal19 21-Sep-13 10:40am    
Hi,
I want code to print the datagrid in silverlight4 which has 21 columns.
I have written code for print but it is getting the snapshot of datagrid with scrollbar.
as it contains a.Pagevisual;
Trushal19 21-Sep-13 10:47am    
private void Print(object sender, RoutedEventArgs e)
{

//working code with screenshot
//PrintDocument pd = new PrintDocument();
//pd.PrintPage += (p, args) =>
//{
// args.PageVisual = this.wellSummaryDataGrid;

//};

//pd.Print("Title1");

1 solution

Not sure why you post same topics twice. I posted an answer there,check it firstExport datagrid in silverliht4[^].
Also you would have a look at these:
http://silverlightpdf.codeplex.com/[^]
Export the current data in silverlight datagrid to PDF[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900