We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Printing PropertyGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

119388 Jun 15,2015 08:09 AM UTC Jun 18,2015 10:01 AM UTC WPF 3
loading
Tags: PropertyGrid
Pim Vrolijk
Asked On June 15, 2015 08:09 AM UTC

Hi,

We have a UserControl that consists of a picture, some TextBlocks and the Syncfusion PropertyGrid. We are trying to print the UserControl but we've run into a problem with the PropertyGrid. 
The PropertyGrid doesn't show any items when printed. The PropertyGrid itself shows up with the ButtonPanel and SearchBox, but without the items. We've tried other controls and they do work. After trying some things before printing (eg. Measure, Arrange, RefreshPropertyGrid), we have found that Application.DoEvents does render some of the items in the PropertyGrid. However, the results aren't consistent and reliable. 

My question: is there something we can do before printing that renders all the items for the PropertyGrid? 

Best Regards

Sugapriya Mariappan [Syncfusion]
Replied On June 16, 2015 01:01 PM UTC

Hi Pim,
Thank you for Contacting Syncfusion support,
We have prepared a sample based on your update and we are unable to reproduce the reported issue "“PropertyGrid doesn't show any items when printed”". In our sample we have implemented printing function for user control in button click and we are able to see the items of Property Grid while printing in OneNote. Kindly download our sample from the following link:
Sample link:PropertyGridSample

Could you please check our sample and let us know whether we following the correct issue reproducing steps or not? If still you have facing the same issue, kindly get back with us by modifying our sample into issue reproducible sample?, so that it would be very helpful for us to proceed further on this.

Please let us know if you have any other concerns.

Regards,
M.Sugapriya

Pim Vrolijk
Replied On June 16, 2015 03:13 PM UTC

Hello Sugapriya,

Thank you for the quick response and the sample. I've modified the sample to what we would like to have. We cannot use PrintVisual method because we are working with multiple pages. Instead we work with the PrintDocument which you can see in the sample I've attached. I also added some controls to show that those are rendered correctly. Another difference is that sometimes the UserControls aren't shown to the user before they are printed. So we cannot use it from an existing view but we make an instance before we print it. 

In my sample, if you make the UserControl before calling the ShowDialog of the PrintDialog, the PropertyGrid renders correctly. However, if you create it after the ShowDialog, the PropertyGrid stays empty. 

If that is the way we are supposed to do it, than we can rewrite and reorder some of our code, but if there is another way to make it render before printing, that would be great. 

Regards, 
P. Vrolijk

Attachment: PropertyGridSample(modified)_695f6ce4.zip

Sugapriya Mariappan [Syncfusion]
Replied On June 18, 2015 10:01 AM UTC

Hi Pim,
We are sorry about the delay being caused
In our PropertyGrid, we have used animation to update/refresh the items from top to bottom and we have used timer to update this. Due to this reason when we call print dialog before calling UserControl, the control will not be updated. So, the items doesn't get populated while printing. We suggest you to call print dialog after initializing UserControl. This will display the items while printing PropertyGrid.
Please let us know if you have any concerns.
Regards,
M.Sugapriya

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;