Hi Martin,
Thank you for using Syncfusion products.
We have analyzed your query and we could not find any attached example file in your update. We suspect that you want to print all the columns and rows and not at one page. You can achieve this requirement by setting the “AllowColumnWidthFitToPrintPage” as false in print settings.
Code Example:
syncgrid.PrintSettings.AllowColumnWidthFitToPrintPage = false; |
UG Link: http://help.syncfusion.com/wpf/sfdatagrid/printing
If we misunderstood your requirement, then could you please share more information about your query? This would be more helpful for us to analyze further.
Thank you,
Jai Ganesh S
Hi Martin,
Thank you for the update.
We have analyzed your query. You can achieve your requirement to print all the columns and rows in one page by setting the PrintScaleOption as FitViewonOnePage like below,
Code Example:
private void PrintPreview_Click(object sender, RoutedEventArgs e) { this.SfdataGrid.PrintSettings.PrintScaleOption = Syncfusion.UI.Xaml.Grid.PrintScaleOptions.FitViewonOnePage; this.SfdataGrid.PrintSettings.AllowColumnWidthFitToPrintPage = false; this.SfdataGrid.PrintSettings.AllowRepeatHeaders = true; this.SfdataGrid.ShowPrintPreview(); } |
We have also prepared a sample based on this and you can download the sample from the below location,
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/142012/ze/SfGridPrintDemo-661777861
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Martin,
Thank you for the update.
We have analyzed your queries and please find the responses for your queries as below,
Query 1: (Columns headers haven't right text)
We cannot understand your requirement clearly. Could you please share more details about your query? This would be more helpful for us to proceed further.
Query 2: (Still not all pages in print preview. First four columns are only on one page. Others missing)
We suspect that you have set the AllowColumnWidthFitToPrintPage as false in your application. Hence only the first four columns are viewed in the page. You can show all columns in a page by setting AllowColumnWidthFitToPrintPage as true,
Code Example [C#]:
private void PrintPreview_Click(object sender, RoutedEventArgs e) { this.SfdataGrid.PrintSettings.AllowColumnWidthFitToPrintPage = true; this.SfdataGrid.PrintSettings.AllowRepeatHeaders = true; this.SfdataGrid.ShowPrintPreview(); } |
Query 3 :( I need print all pages with reading format. If fit all columns on one page, than data are not readable)
I need print all pages with reading format:
We already mentioned in our last update, you can print all the columns and rows in one page by setting the PrintScaleOption as FitViewonOnePage.
If fit all columns on one page, than data are not readable:
If we have more columns in a Grid, then it will compress and fit in one page. You can view these columns by increasing the zooming level or increasing the page size. This is the default behavior of our Grid.
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Thank you for update, but if i try your example, VS 2013 fail on build with error"'Syncfusion.UI.Xaml.Grid.PrintSettings' does not contain a definition for 'PrintScaleOption' and no extension method 'PrintScaleOption' accepting a first argument of type 'Syncfusion.UI.Xaml.Grid.PrintSettings' could be found (are you missing a using directive or an assembly reference?)"I using Syncfusion components with version v4.0.30319.