menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BeginRowLayoutEventArgs - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class BeginRowLayoutEventArgs

    Represents the arguments of StartRowLayout Event.

    Inheritance
    System.Object
    BeginRowLayoutEventArgs
    Namespace: Syncfusion.Pdf.Tables
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class BeginRowLayoutEventArgs : EventArgs
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    PdfLightTable table = (PdfLightTable)sender;
    int count = table.Columns.Count;
    int[] spanMap = new int[count];
    // Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap[0] = 2;
    spanMap[1] = 3;
    args.ColumnSpanMap = spanMap;
    //Set row height.
    args.MinimalHeight = 30f;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    Dim table As PdfLightTable = CType(sender, PdfLightTable)
    Dim count As Integer = table.Columns.Count
    Dim spanMap(count - 1) As Integer
    ' Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap(0) = 2
    spanMap(1) = 3
    args.ColumnSpanMap = spanMap
    'Set row height.
    args.MinimalHeight = 30f
    End If
    End Sub

    Properties

    Cancel

    Gets or sets a value indicating whether table drawing should stop.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    args.Cancel = true;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    args.Cancel = True
    End If
    End Sub

    CellStyle

    Gets or sets the cell style.

    Declaration
    public PdfCellStyle CellStyle { get; set; }
    Property Value
    Type
    PdfCellStyle
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    args.CellStyle.TextPen = PdfPens.Red;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    args.CellStyle.TextPen = PdfPens.Red
    End If
    End Sub

    ColumnSpanMap

    Gets or sets the span map.

    Declaration
    public int[] ColumnSpanMap { get; set; }
    Property Value
    Type
    System.Int32[]
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    PdfLightTable table = (PdfLightTable)sender;
    int count = table.Columns.Count;
    int[] spanMap = new int[count];
    // Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap[0] = 2;
    spanMap[1] = 3;
    args.ColumnSpanMap = spanMap;
    //Set row height.
    args.MinimalHeight = 30f;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    Dim table As PdfLightTable = CType(sender, PdfLightTable)
    Dim count As Integer = table.Columns.Count
    Dim spanMap(count - 1) As Integer
    ' Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap(0) = 2
    spanMap(1) = 3
    args.ColumnSpanMap = spanMap
    'Set row height.
    args.MinimalHeight = 30f
    End If
    End Sub

    IgnoreColumnFormat

    Gets or sets a value indicating whether column string format should be ignored.

    Declaration
    public bool IgnoreColumnFormat { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    args.IgnoreColumnFormat = true;
    PdfLightTable table = (PdfLightTable)sender;
    int count = table.Columns.Count;
    int[] spanMap = new int[count];
    // Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap[0] = 2;
    spanMap[1] = 3;
    args.ColumnSpanMap = spanMap;
    //Set row height.
    args.MinimalHeight = 30f;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    args.IgnoreColumnFormat = True
    Dim table As PdfLightTable = CType(sender, PdfLightTable)
    Dim count As Integer = table.Columns.Count
    Dim spanMap(count - 1) As Integer
    ' Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap(0) = 2
    spanMap(1) = 3
    args.ColumnSpanMap = spanMap
    'Set row height.
    args.MinimalHeight = 30f
    End If
    End Sub

    MinimalHeight

    Sets the minimal height of the row.

    Declaration
    public float MinimalHeight { get; set; }
    Property Value
    Type
    System.Single
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    PdfLightTable table = (PdfLightTable)sender;
    int count = table.Columns.Count;
    int[] spanMap = new int[count];
    // Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap[0] = 2;
    spanMap[1] = 3;
    args.ColumnSpanMap = spanMap;
    //Set row height.
    args.MinimalHeight = 30f;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    Dim table As PdfLightTable = CType(sender, PdfLightTable)
    Dim count As Integer = table.Columns.Count
    Dim spanMap(count - 1) As Integer
    ' Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap(0) = 2
    spanMap(1) = 3
    args.ColumnSpanMap = spanMap
    'Set row height.
    args.MinimalHeight = 30f
    End If
    End Sub

    RowIndex

    Gets the index of the row. Read-Only.

    Declaration
    public int RowIndex { get; }
    Property Value
    Type
    System.Int32
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    PdfLightTable table = (PdfLightTable)sender;
    int count = table.Columns.Count;
    int[] spanMap = new int[count];
    // Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap[0] = 2;
    spanMap[1] = 3;
    args.ColumnSpanMap = spanMap;
    //Set row height.
    args.MinimalHeight = 30f;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    Dim table As PdfLightTable = CType(sender, PdfLightTable)
    Dim count As Integer = table.Columns.Count
    Dim spanMap(count - 1) As Integer
    ' Set just spanned cells. Other values are not important except negatives that are not allowed.
    spanMap(0) = 2
    spanMap(1) = 3
    args.ColumnSpanMap = spanMap
    'Set row height.
    args.MinimalHeight = 30f
    End If
    End Sub

    Skip

    Gets or sets a value indicating whether this row should be ignored.

    Declaration
    public bool Skip { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    // Create a new document
    PdfDocument document = new PdfDocument();
    //Create a Page
    PdfPage page = document.Pages.Add();
    //Create DataTable for source
    DataTable dataTable = new DataTable("myTable");
    dataTable.Columns.Add("ID1");
    dataTable.Columns[0].Caption = "id";
    dataTable.Columns.Add("ID2");
    object[] values = new object[] { "Roll Number", "Student Name" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Cris" };
    dataTable.Rows.Add(values);
    values = new object[] { "011", "Clay" };
    dataTable.Rows.Add(values);
    //Create the PdfLightTable
    PdfLightTable pdfLightTable = new PdfLightTable();
    // Subscribe the begin row event
    pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    args.Skip = true;
    }
    }
    ' Create a new document
    Dim document As New PdfDocument()
    'Create a Page
    Dim page As PdfPage = document.Pages.Add()
    'Create DataTable for source
    Dim dataTable As New DataTable("myTable")
    dataTable.Columns.Add("ID1")
    dataTable.Columns(0).Caption = "id"
    dataTable.Columns.Add("ID2")
    Dim values() As Object = { "Roll Number", "Student Name" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Cris" }
    dataTable.Rows.Add(values)
    values = New Object() { "011", "Clay" }
    dataTable.Rows.Add(values)
    'Create the PdfLightTable
    Dim pdfLightTable As New PdfLightTable()
    ' Subscribe the begin row event
    AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
    'Set the data source
    pdfLightTable.DataSource = dataTable
    'Draw PdfLightTable.
    pdfLightTable.Draw(page, New PointF(0, 0))
    'Save the document.
    document.Save("Output.pdf")
    'Close the document
    document.Close(True)
    
    Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    args.Skip = True       
    End If
    End Sub

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

    PdfDocument
    PdfLightTable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved