Centering a Table on the Page
To center a table on the page, set the AlignInParentHorz property to Center. Add the following code to the Form_Load event:
Dim table As C1.C1PrintDocument.RenderTable = New C1.C1PrintDocument.RenderTable(Me.C1PrintDocument1)
table.Style.AlignInParentHorz = C1.C1PrintDocument.AlignInParentHorzEnum.Center
• C#
C1.C1PrintDocument.RenderTable table = new C1.C1PrintDocument.RenderTable(this.c1PrintDocument1);
table.Style.AlignInParentHorz = C1.C1PrintDocument.AlignInParentHorzEnum.Center;
This topic illustrates the following:
Your C1PrintDocument should appear similar to the image below, with the table centered on the page.
|