# DatalistNode
Class Inherits Node
## About
`DatalistNode` stores reusable suggestion values for compatible form controls and exports an HTML datalist element. It is visible in the editor for authoring but does not expose text typography or decorative styling because HTML datalists are not rendered document content.
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ActionItem | index As Integer | ToolbarItem | Returns the contextual toolbar item at the specified index. |
| AddOption | value As String <br> label As String = "" <br> disabled As Boolean = False | (None) | Adds a suggestion option to the datalist. |
| ClearOptions | (None) | (None) | Removes all suggestion options. |
| Constructor | (None) | (None) | Creates a new datalist node. |
| Destructor | (None) | (None) | Releases option event handlers owned by this node. |
| Duplicate | (None) | Node | Returns an independent copy of this node. |
| FromHTML | element As HTMLSupport.HTMLElement | Boolean | Imports a datalist element. |
| FromJSON | data As JSONItem | Boolean | Restores state from JSON. |
| HTMLTags | (None) | String | Returns the HTML tag names supported by this node type. |
| IncludeInVectorPDF | (None) | Boolean | Returns whether this node participates in vector PDF layout and export. |
| InspectorSections | (None) | InspectorSection | Returns the datalist identity and suggestion data exposed by the inspector. |
| LastActionIndex | (None) | Integer | Returns the last zero-based action index supplied by this node, or -1 when there are no actions. |
| LastOptionIndex | (None) | Integer | Returns the last zero-based option index, or -1 when there are no options. |
| LocalizeToolbarItem | strings As GraffitiProEditor.Editor | (None) | Sets this node type's toolbar item text from the supplied editor's localization properties. The editor calls it when the type is registered, when the editor opens, and when a locale pack is applied to the editor. A custom node type can override it to localize its own toolbar item. |
| OptionAt | index As Integer | FormOption | Returns the suggestion option at the specified index. |
| PerformAction | index As Integer <br> selectedItem As DesktopMenuItem | (None) | Handles the contextual toolbar action. |
| PerformToolbarAction | editor As Editor <br> selectedItem As DesktopMenuItem | (None) | Handles activation of the main-toolbar item. |
| PreferredHeight | g As Graphics <br> availableWidth As Double | Double | Returns the preferred height. |
| RemoveOptionAt | index As Integer | (None) | Removes the suggestion option at the specified index. |
| Render | g As Graphics <br> bounds As Rect <br> selected As Boolean | (None) | Draws an editor-only preview of the datalist and its suggestions. |
| ToHTML | (None) | String | Returns an HTML representation of the datalist. |
| ToJSON | (None) | JSONItem | Returns the persistent state as JSON. |
| ToMarkdown | (None) | String | Returns the datalist as raw HTML because Markdown has no native equivalent. |
| TypeName | (None) | String | Returns the display name. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| ID | String | (None) | Gets or sets the HTML identifier referenced by input elements. |
## Notes
Datalists provide values but do not define visual typography in exported HTML.
### JSON Format
`id` is the string referenced by compatible fields. `options` is an ordered array of `FormOption` objects. Although the datalist has a visible authoring representation, its JSON does not add text typography or decorative styling beyond the common node state.
`id` is omitted when empty.
### Localization
`Strings.TextDatalistLabelFormat` controls the authoring label drawn in the editor and requires the `%id%` token. Preserve the token while translating, but place it wherever required by the target language. `Strings.TextNoIDCaption` supplies the visible replacement when the datalist has no identifier.
### Options and Association
Use the inspector actions to add, insert, remove, and reorder values. Give the datalist a stable ID. Compatible controls in the same document populate their Datalist selector from those IDs and include None to remove the association.