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. Image for the cookie policy date

Print Preview of Grid

I''m executing the following code for a Print Preview of a GDBG : GridPrintDocument gpdPrintGrid = new GridPrintDocument(this, true); pdPrintGrid.DefaultPageSettings.Landscape = this.PrintLandscape; PrintPreviewDialog dlg = new PrintPreviewDialog() ; dlg.Document = gpdPrintGrid; dlg.ShowDialog(); The dialog is displayed but the Zoom button doesn''t seem to work. Nothing happens when clicking the button and the dropdown doesn''t display. Right now the test grid only generates one page. Am I missing something? Lori

10 Replies

AD Administrator Syncfusion Team June 14, 2004 02:14 AM

This sample works OK for me. Does it work OK for you? If not what version of our grid are you using? PrintPreview_8756.zip


LS Lori S. Pearsall June 14, 2004 09:55 PM

Every sample I''ve run works for me - except for my project! It''s a GDBG in a navigation control. I''ve included an image of what it looks like in the Print Preview dialog. I don''t know what other clues to give. - I''m handling PrepareViewStyleInfo - The last four columns in the second row are PushButtons printpreviewproblem_7144.zip


LS Lori S. Pearsall June 14, 2004 10:02 PM

Couple of more details ... - The GDBG is contained in a GridRecordNavigationControl that is on a TabControlAdv control. - The TabControlAdv control is on an MDI child form that is using Essential Tools XPMenus.


LS Lori S. Pearsall June 14, 2004 10:10 PM

I forgot - my version is 2.0.5.1 using VS Studio 2003. Are there any events that I might be handling that would affect the Zoom dropdown?


AD Administrator Syncfusion Team June 15, 2004 09:49 AM

The PrintPreview support is part of the standard .NET Framework class so I am not sure what grid events would effect this. I tried to do a MDI project with a TabControlAdv and a GridDataBoundGrid on the second tab. The print preview seems to work ok in this sample. MDI_8798.zip If you can attach a sample showing the problem, maybe we can spot something here.


LS Lori S. Pearsall June 15, 2004 12:11 PM

I can''t seem to produce a sample that has the problem - except for my full-blown project. I''ve set breakpoints and have examined PrintPreviewDialog. There is a DropDownMenu and it does have items in it (9 to be exact), but it''s as if the ButtonDropDown event isn''t even wired. I''ve compared the PrintPreviewDialogs between my project and a working sample and I see no differences. I give up unless you have any other suggestions!


LS Lori S. Pearsall June 15, 2004 06:15 PM

The mystery deepens - I don''t know whether this is a grid or XPMenus issue. I''ve been running the code I had listed above from a context menu (XPMenus.PopupMenu). This causes the Zoom button to be inactive. I''ve now incorporated this same button into a child menu that gets merged into a parent (XPMenus) and the Zoom button works fine. This is the same BarItem being hooked into both a menu & popup structure and, therefore, the same Click event code is being executed.


AD Administrator Syncfusion Team June 16, 2004 07:01 AM

For your popup menu, try setting PopupMenu.SynchronousPopup = false to see if that affects this problem.


LS Lori S. Pearsall June 16, 2004 07:51 AM

Unfortunately, the Tools.XPMenus.PopupMenu doesn''t have that property.


LS Lori S. Pearsall June 16, 2004 08:18 AM

I''m mistaken - SynchronousPopup isn''t in the Class Reference but it is present on the popup. And ... it works!! Great catch!

Loader.
Live Chat Icon For mobile
Up arrow icon