Print Preview not working for telerik radgridview

1 Answer 124 Views
GridView
Nandan
Top achievements
Rank 1
Iron
Iron
Iron
Nandan asked on 08 Feb 2022, 10:37 AM

Hi Dess

I have used your previously provided sample project but project replicates the same error on the Windows10 machine.

I am sending screenshot for same.

We had discussion previously my Ticket 1549675 for your ready references

Regards

Nandan Navale

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 11 Feb 2022, 07:50 AM

Hello Nandan,

Thank you for the provided project.

I have checked the other ticket and tested the project on my side. The PrintPreview window is populated as expected. This is quite strange behavior as the same project is not working on your side. Upon looking at the image, the project is using the ControlDefault theme. Can you specify which version of our DLLs are you using? Also, when I run the project the PrintPreview form has 1 page. In your image, it has 12 pages. Can you confirm that you haven't modified the project and just downloaded it and run it?

I have tested the project with VS 2019 Preview. Do you have a newer version of VS on your machine just to test the project? 

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nandan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 11 Feb 2022, 08:12 AM | edited

Hello Dinko

Thank you very much for replying.

Yes its very strange form has one page it shows 12 pages.  I haven't modified your project download and run project. I am using VS 2015 and sql server 2014 64 Bit 

I am not much aware of telerik controls my previous developer used to work on this he left job but I like this controls I have to learn lot about telerik controls. Version is 2020.1.113.40

and

Os is windows 10 64 Bit. 

But same project perfectly on windows 7 with 64 bit. One question your radgrid will work on Window 11-64 Bit just curiosity!

Regards

Nandan

 

 

Dinko | Tech Support Engineer
Telerik team
commented on 14 Feb 2022, 01:08 PM

Thank you for the shared details.

I have tested the project with the specified version but still, the result is the same as the newest version. The PrintPreview window is populated correctly with only 1 page. In your post, you mentioned that the problem occurs on Windows 10.  As it works on Windows 7 this leads me to think that the problem comes from the printing drivers installed on this machine. Could it be possible to test the same project on a different machine with Windows 10? You can try to test the printing drivers on the machine by using the free version of PrimoPDF. This software simulates printing by creating a PDF file and saving it on your machine. The file represents the content that will be printed. This way you can test if the pages will be blank again.

Nandan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 14 Feb 2022, 01:50 PM | edited

Hi Dinko 

Thanks again

I have tested application on different pc with Windows 10 with 64 bit it works perfectly. I think not error  in telerik gridview. How to test PrimoPdf I have download and installed I want to check what actually went wrong and why print preview not working. One more question I want to open print preview in maximize mode.

Thanks & Regards

Nandan Navale

 

Dinko | Tech Support Engineer
Telerik team
commented on 17 Feb 2022, 08:55 AM

When you downloaded the PrimoPdf application you can open it. Then open some random PDF documents, click the Print icon at the top. You can share if you are seeing something in the PrintPreview content. Then on the left, set the Nitro PDF Creator to simulate printing and save the result in a PDF on your machine. You can open the document to test if there is a content inside. You can do the same approach when printing the RadGridView. When the PrintPreview dialog is open, click on the Print button in the top right corner. Then choose the Nitro PDF Creator.

You could check the printing drivers install on your machine and try to update them. As for your second question for maximizing the RadPrintPreviewDialog. To maximize the dialog you will need to have an instance of it. In this case, you can avoid using the PrintPreview() method of the RadGridView. Instead, you can create the RadPrintDocument and pass it to your instance of the RadPrintPreviewDialog. Then you can set the WindowState property to Maximize. Check the following code snippet.

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
    Dim doc As New RadPrintDocument()
    doc.AssociatedObject = Me.RadGridView1

    Dim dialog As New RadPrintPreviewDialog(doc)
    dialog.WindowState = FormWindowState.Maximized

    dialog.ThemeName = Me.RadGridView1.ThemeName
    dialog.ShowDialog()
End Sub

Nandan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 17 Feb 2022, 10:28 AM

Hi Dinko

Thank you very much My doubt resolved

Thanks & Regards

Nandan Navale

 

Tags
GridView
Asked by
Nandan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or