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
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.