File Formats

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

    Show / Hide Table of Contents

    Class PdfLoadedListItem

    Represents loaded list item.

    Inheritance
    System.Object
    PdfLoadedListItem
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfLoadedListItem
    Examples
    //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load the list box field          
    PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
    // Get the selected list item
    PdfLoadedListItem listItem = listField.SelectedItem;
    listItem.Text = "NewText";
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load the list box field          
    Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
    ' Get the selected list item
    Dim listItem As PdfLoadedListItem = listField.SelectedItem
    listItem.Text = "NewText"
    doc.Save("Form.pdf")
    doc.Close(True)

    Constructors

    PdfLoadedListItem(String, String)

    Initializes a new instance of the PdfLoadedListItem class with the specific text and value.

    Declaration
    public PdfLoadedListItem(string text, string value)
    Parameters
    Type Name Description
    System.String text

    The text.

    System.String value

    The value.

    Examples
      // Load the list box field    
    PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
    // Get the selected list item
    PdfLoadedListItem listItem = new PdfLoadedListItem("C#.Net",".NET Course");
    // Add the list item in list field
    listField.Values.Add(listItem);
      ' Load the list box field
    Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
    ' Get the selected list item
    Dim listItem As PdfLoadedListItem = New PdfLoadedListItem("C#.Net",".NET Course")
    ' Add the list item in list field
    listField.Values.Add(listItem)

    Properties

    Text

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    Value

    Gets or sets the value of the list item.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    A string value representing the value of the item.

    Examples
    //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load the list box field          
    PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
    // Get the selected list item
    PdfLoadedListItem listItem = listField.SelectedItem;
    listItem.Value = "C#.NET";
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load the list box field          
    Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
    ' Get the selected list item
    Dim listItem As PdfLoadedListItem = listField.SelectedItem
    listItem.Value = "C#.NET"
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedListBoxField

    See Also

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