Hi Stefan,
Thanks for the sample application.The print priview works fine when the vertical scroll bar for the xamdatagrid is at the top. If you move the vertical scollbar to any other position (i.e either to the middle or to the bottom) print preview is a blank document viewer.
And we are using the following dll intsead of v13.1
infragisticswpf4.datapresenter.v12.2,InfragisticsWPF4.Editors.v12.2, InfragisticsWPF4.v12.2
Please check above mentioned scenario in the sample application attached by you in previous post.
Regards,
Sasikumar
Hello Sasikumar,
I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Nope still no luck,when RecordContainerGenerationMode property is set to pre load only the contents visible in the view are getting loaded other rows are blank. I am not using any third party tool for exporting/printing. We are using other third party components in our application other than infragistcis grid. We are using the follwing code to print the infragistics grid
"Grid" in the following code is a content control that holds an infragistics grid.
FrameworkElement fe = (Grid.Content as FrameworkElement); System.Printing.PrintCapabilities capabilities = printDlg.PrintQueue.GetPrintCapabilities(printDlg.PrintTicket); fe.Measure(new Size(Int32.MaxValue, Int32.MaxValue)); Size visualSize = fe.DesiredSize; if (fe.DesiredSize.Width >= fe.ActualWidth || fe.DesiredSize.Height >= fe.ActualHeight) fe.Arrange(new Rect(new Point(0, 0), visualSize)); MemoryStream stream = new MemoryStream(); string pack = "pack://temp.xps"; Uri uri = new Uri(pack); DocumentPaginator paginator; XpsDocument xpsDoc; DocumentViewer doc = new DocumentViewer(); Window _window = new Window(); using (Package container = Package.Open(stream, FileMode.Create)) { PackageStore.AddPackage(uri, container); using (xpsDoc = new XpsDocument(container, CompressionOption.Fast, pack)) { XpsSerializationManager rsm = new XpsSerializationManager(new XpsPackagingPolicy(xpsDoc), false); rsm.SaveAsXaml(Grid.Content);
paginator = ((IDocumentPaginatorSource) xpsDoc.GetFixedDocumentSequence()).DocumentPaginator;
paginator.PageSize = visualSize;
paginator = new VisualDocumentPaginator(paginator, new Size(capabilities.PageImageableArea.ExtentWidth, capabilities.PageImageableArea.ExtentHeight), new Size(10, 10));
doc.Document = xpsDoc.GetFixedDocumentSequence();
_window.Content = doc; _window.ShowDialog();
printDlg.PrintDocument(paginator, "A Flow Document"); }
PackageStore.RemovePackage(uri); }
Since you are using a third party control for exporting/printing I am not able to say what can cause your issue. It could be connected with the virtualization of the XamDataGrid. You can try to turn it off and see if the will occur. You can turn it of by setting the XamDataGrid's RecordContainerGenerationMode Property to PreLoad.
Hope this helps you.
Thanks for the reply. In my previous post I mentioned that "I will not be able to use Infragistics reporting as my application contains a third party graphics as well and i will have to club both graphics component and grid component in printout".