Class PdfLightTableDataSourceType
Specifies the data source type.
Inheritance
System.Object
PdfLightTableDataSourceType
Namespace: Syncfusion.Pdf.Tables
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public sealed class PdfLightTableDataSourceType : Enum
Examples
// Create a new document
PdfDocument document = new PdfDocument();
//Create DataTable for source
DataTable dataTable = new DataTable("Table");
dataTable.Columns.Add("ID1");
dataTable.Columns[0].Caption = "id";
dataTable.Columns.Add("ID2");
object[] values = new object[] { "Table Features Demo", "" };
dataTable.Rows.Add(values);
//Create a new page
PdfPage page = document.Pages.Add();
//Create the PdfLightTable
PdfLightTable table = new PdfLightTable();
//Set the data source type
table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
//Set the data table
table.DataSource = dataTable;
Draw the table
table.Draw(page.Graphics);
//Save the document
document.Save("Output.pdf");
//Close the document
document.Close(true);
'Create a new document
Dim document As PdfDocument = New PdfDocument()
'Create DataTable for source
Dim dataTable As DataTable = New DataTable("Table")
dataTable.Columns.Add("ID1")
dataTable.Columns(0).Caption = "id"
dataTable.Columns.Add("ID2")
Dim values() As Object = New Object() {"Table Features Demo", ""}
dataTable.Rows.Add(values)
'Create a page
Dim page As PdfPage = document.Pages.Add()
'Create the PdfLightTable
Dim table As PdfLightTable = New PdfLightTable()
'Set the data source type
table.DataSourceType = PdfLightTableDataSourceType.TableDirect
'Set the data source
table.DataSource = dataTable
' Draw the table
table.Draw(page.Graphics)
'Save the document
document.Save("Output.pdf")
'Close the document
document.Close(True)
Fields
External
Specifies that the PdfLightTable has been bind to an external data source.
Declaration
public const PdfLightTableDataSourceType External
Field Value
Type |
---|
PdfLightTableDataSourceType |
TableDirect
Specifies that the values are directly bind to the PdfLightTable.
Declaration
public const PdfLightTableDataSourceType TableDirect
Field Value
Type |
---|
PdfLightTableDataSourceType |