ASPxClientRibbon.SetItemValueByName(name, value) Method
Sets the value of the item with the specified name.
#Declaration
SetItemValueByName(
name: string,
value: any
): void
#Parameters
Name | Type | Description |
---|---|---|
name | string | A string value specifying the name of the item. |
value | any | An object that is the new item value. |
#Remarks
The ribbon control’s client-side functionality allows items to be accessed programmatically on the client side. The SetItemValueByName method sets a value of an item specified by its name. An item’s name is defined by the RibbonTab.Name property.
The format of the value parameter depends on the processed ribbon item type. The table below lists the ribbon items with the values.
Editor Name | Server-Side Class | Value Format | Example |
---|---|---|---|
Button | - | - | |
Check Box |
| ribbon. | |
Color Button | The method supports the following color value formats.
| ribbon. ribbon. ribbon. ribbon. | |
Combo Box | A string that is the item text or value | ribbon. | |
Date Edit | A date object specifying the item value | ribbon. | |
Drop-Down Button | - | - | |
Drop-Down Toggle Button |
| ribbon. | |
Drop-Down Gallery | Depends on the Ribbon | ribbon. | |
Gallery Bar | Depends on the Ribbon | ribbon. | |
Option Button |
| ribbon. | |
Spin Edit | A number specifying the item value | ribbon. | |
Template Item | - | - | |
Text Box | A string specifying the item value | ribbon. | |
Toggle Button |
| ribbon. |
You can use the ASPxClientRibbon.GetItemValueByName method to get the value of an item with the specified name.