Class PdfLoadedListItem
Represents loaded list item.
Inheritance
System.Object
PdfLoadedListItem
Namespace: Syncfusion.Pdf.Parsing
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfLoadedListItem : Object
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
Gets or sets the text of the list item.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value representing the display text 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.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)
See Also
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)