Hi,
is there any way to update hte print preview dialog once it is loaded with grid. Actually what I want to do is that when user click on the printpreview button, print preview is loaded and and then using menu option he update the grid lines and I want to see the updated print preview. is it possible to refersh the print preview with latest grid.
Regards,Bunty :)
I'm not sure. It may depend on which print preview you are using.
If the InitializePrintPreview event gives you a reference to the print preview dialog, then you might be able to use that and call the close method on it. But I'm not sure how tighly integrated this dialog is with the grid. The grid may not be expected you to do that.
Another possibility would be to use the UltraPrintPreviewDialog along with an UltraGridPrintDocument. This dialog is external to the grid and might give you more control.
Mike,
Thank you for your update. Is it possible to close the print preview and then reload the print preview option on custom menu click item? Please suggest. Is there any way I can close the print preview option and then reload with new grid. I have done dispose but it throws error on the form.
Bunty :)
Hi Bunty,
Bunty_Mishra said:is there any way to update hte print preview dialog once it is loaded with grid
No. The way printing works is that the PrintDocument fires off events and the grid draws itself into each page. All of this happens before you ever see the print preview. So it's not something you can dynamically change on the fly.