Class UiOptionSelectableValue
Represents a selectable value for a UI option.
Implements
Inherited Members
Namespace: Serenity.Ui.Domain.Entities
Assembly: Serenity.Ui.Domain.dll
Syntax
public class UiOptionSelectableValue : UiOptionValue, IFoundationSettings
Constructors
UiOptionSelectableValue(string, string, string, ConfigurationEntry[], UiComponentInteractionType)
Initializes a new instance of the UiOptionSelectableValue class.
Declaration
public UiOptionSelectableValue(string id, string menuId, string value, ConfigurationEntry[] selectableValues, UiComponentInteractionType uiElement)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique identifier of the option. |
| string | menuId | The view identifier of the option. |
| string | value | The string value of the option. |
| ConfigurationEntry[] | selectableValues | The array of selectable key-value pairs. |
| UiComponentInteractionType | uiElement | The interaction type of the UI element. |
Methods
GetSelectableValues()
Gets the array of selectable key-value pairs.
Declaration
public ConfigurationEntry[] GetSelectableValues()
Returns
| Type | Description |
|---|---|
| ConfigurationEntry[] | The array of selectable key-value pairs. |
GetSelectedIndex()
Gets the index of the currently selected value.
Declaration
public int GetSelectedIndex()
Returns
| Type | Description |
|---|---|
| int | The index of the currently selected value. |
GetSelectedValue()
Gets the currently selected key-value pair.
Declaration
public ConfigurationEntry GetSelectedValue()
Returns
| Type | Description |
|---|---|
| ConfigurationEntry | The currently selected key-value pair. |
SetValue(string)
Sets the value of the option and updates the selected index accordingly.
Declaration
public override void SetValue(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new value to set. |
Overrides
ToString()
Returns a string representation of the UiOptionSelectableValue.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |