The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I''m printing a databound grid. The column headings are long and the printed page puts the column headings into 2 lines but not fully printing it.
- How can I make the column headings wider on the printout? Column headings look ok on the form because they''re being automatically adjusted depending on data length.
Here''s the code that I''m using:
Dim pd As New GridPrintDocument(myDatagrid)
Dim dlg As New PrintDialog
Dim result As DialogResult
dlg.Document = pd
dlg.AllowSelection = True
dlg.AllowSomePages = True
result = dlg.ShowDialog
If result = DialogResult.OK Then
pd.Print()
End If
Please provide an example in VB .Net.
Thanks.
ADAdministrator Syncfusion Team June 7, 2004 02:44 PM UTC
Normally, what you see on the form is the same as the print output. Here is a sample with a long title in one header cell that seems to print ok for me. What are you doing differently?
ForumPrint_6897.zip
ADAdministrator Syncfusion Team June 7, 2004 04:14 PM UTC
On loading the grid, I have the following code to size the columns:
myDatagrid.Model.ColWidths.ResizeToFit(GridRangeInfo.Table, GridResizeToFitOptions.IncludeHeaders)
ADAdministrator Syncfusion Team June 7, 2004 05:36 PM UTC
I added the ResizeToFit call at the bottom of the FormLoad in the sample attached above and did not see any difference. Can you see the problem in the attached sample?
ADAdministrator Syncfusion Team June 7, 2004 05:43 PM UTC
The sample doesn''t compile on my pc. It''s complaining about these two lines:
Me.GridDataBoundGrid1.OptimizeInsertRemoveCells = True
Me.GridDataBoundGrid1.UseListChangedEvent = True
ADAdministrator Syncfusion Team June 7, 2004 05:47 PM UTC
The samples were done with the latest library code, 2.0.5.1. If you are using an earlier library, you can just comment out those two lines that are giving the syntax error.