UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EndRowLayoutEventHandler

    Show / Hide Table of Contents

    Class EndRowLayoutEventHandler

    Represents the method that will handle EndRowLayout event of PdfLightTable.

    Inheritance
    System.Object
    EndRowLayoutEventHandler
    Namespace: Syncfusion.Pdf.Tables
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public sealed class EndRowLayoutEventHandler : MulticastDelegate
    Remarks

    This event is raised when finishing a row in a layout.

    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();
    //Set the data source
    pdfLightTable.DataSource = dataTable;
    // Subscribe the end row event
    pdfLightTable.EndRowLayout += new EndRowLayoutEventHandler(table_EndRowLayout);
    //Draw PdfLightTable.
    pdfLightTable.Draw(page, new PointF(0, 0));
    //Save the document.
    document.Save("Output.pdf");
    //Close the document
    document.Close(true);
    
    void table_EndRowLayout(object sender, EndRowLayoutEventArgs args)
    {
    if (args.RowIndex == 1)
    {
    // Cancel property used to cancel the table rendering operation
    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()
    'Set the data source
    pdfLightTable.DataSource = dataTable
    ' Subscribe the end row event
    AddHandler pdfLightTable.EndRowLayout, AddressOf table_EndRowLayout
    '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_EndRowLayout(ByVal sender As Object, ByVal args As EndRowLayoutEventArgs)
    If args.RowIndex = 1 Then
    ' Cancel property used to cancel the table rendering operation
    args.Cancel = True
    End If
    End Sub

    Constructors

    EndRowLayoutEventHandler(Object, IntPtr)

    Declaration
    public EndRowLayoutEventHandler(object object, IntPtr method)
    Parameters
    Type Name Description
    System.Object object
    System.IntPtr method

    Methods

    BeginInvoke(Object, EndRowLayoutEventArgs, AsyncCallback, Object)

    Declaration
    public virtual IAsyncResult BeginInvoke(object sender, EndRowLayoutEventArgs args, AsyncCallback callback, object object)
    Parameters
    Type Name Description
    System.Object sender
    EndRowLayoutEventArgs args
    System.AsyncCallback callback
    System.Object object
    Returns
    Type Description
    System.IAsyncResult

    EndInvoke(IAsyncResult)

    Declaration
    public virtual void EndInvoke(IAsyncResult result)
    Parameters
    Type Name Description
    System.IAsyncResult result

    Invoke(Object, EndRowLayoutEventArgs)

    Declaration
    public virtual void Invoke(object sender, EndRowLayoutEventArgs args)
    Parameters
    Type Name Description
    System.Object sender
    EndRowLayoutEventArgs args

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

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