Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2387
Printing all the grids on a UltraTabStripControl
posted

I have a a UltraTabStripControl that has an UltraGrid on it.  There will be one or more tabs, depending on the dataset.  I would like to print all the tabs to a report.  

I tried creating a second instance of the UserControl that has the UltraTabStripControl/UltraGrid on it, then iterating through the datasource, setting the UltraGrid's datasource appropriately.  This did not work out very well, it looks like the UltraGridDocumentExporter needs the UltraGrid to be displayed first.

I then tried putting the UserControl into a form that is displayed, then iterate through the tabs, doing the printing.  This worked fine.

Is there any way to do this where the user will not see what is happening?

Sam

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Sam,

    My guess is that when you created your usercontrol in code, you didn't add it to a form and so it has no BindingContext, which means the grid has no BindingContext. So you can probably get this to work by simply adding the control to the Controls collection on the form without actually displaying it - you could position it off-screen.

    Another option might be to simply assign the BindingContext on the UserControl, and possibly on the grid, also, to the form's BindingContext or even to a new BindingContext.

Children
No Data