Class PdfHeaderSource
Specifies the values where the header should formed from.
Inheritance
System.Object
PdfHeaderSource
Namespace: Syncfusion.Pdf.Tables
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public sealed class PdfHeaderSource : Enum
Examples
// Create a new document
PdfDocument document = new PdfDocument();
//Add a page
PdfPage page = document.Pages.Add();
//Create the PdfLightTable
PdfLightTable table = new PdfLightTable();
// Set the DataSourceType as Direct
table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
// Create new Columns
table.Columns.Add(new PdfColumn("Roll Number"));
table.Columns.Add(new PdfColumn("Name"));
table.Columns.Add(new PdfColumn("Class"));
//Set the header source
table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
// Add new Rows
table.Rows.Add(new object[] { "111", "Maxim", "III" });
// Draw the table
table.Draw(page, new PointF(0, 0));
//save the document
document.Save("Output.pdf");
//Close the document
document.Close(true);
' Create a new document
Dim document As New PdfDocument()
'Add a page
Dim page As PdfPage = document.Pages.Add()
'Create the PdfLightTable
Dim table As New PdfLightTable()
' Set the DataSourceType as Direct
table.DataSourceType = PdfLightTableDataSourceType.TableDirect
' Create new Columns
table.Columns.Add(New PdfColumn("Roll Number"))
table.Columns.Add(New PdfColumn("Name"))
table.Columns.Add(New PdfColumn("Class"))
'Set the header source
table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
' Add new Rows
table.Rows.Add(New Object() { "111", "Maxim", "III" })
' Draw the table
table.Draw(page, New PointF(0, 0))
'save the document
document.Save("Output.pdf")
'Close the document
document.Close(True)
Fields
ColumnCaptions
The header is formed from column captions' values.
Declaration
public const PdfHeaderSource ColumnCaptions
Field Value
Type |
---|
PdfHeaderSource |
Rows
The header is formed from rows.
Declaration
public const PdfHeaderSource Rows
Field Value
Type |
---|
PdfHeaderSource |