ASPxClientRibbonItem.SetValue(value) Method
Sets the item value.
Declaration
SetValue(
value: any
): void
Parameters
Name | Type | Description |
---|---|---|
value | any | An that specifies the item value. |
Remarks
Use the SetValue method to specify the item value. To get the value, use the ASPxClientRibbonItem.GetValue method.
The format of the value parameter depends on the processed ribbon item type. The table below lists the ribbon items with the value formats.
Editor Name | Server-Side Class | Value Format | Example |
---|---|---|---|
Button | - | - | |
Check Box |
| ribbonItem.SetValue(true); | |
Color Button | The method supports the following color value formats.
| ribbonItem.SetValue(‘red’); ribbonItem.SetValue(‘#FFFF00’); ribbonItem.SetValue(‘#FF0’); ribbonItem.SetValue(‘rgb(255,255,0)’); | |
Combo Box | A string that is the item text value | ribbonItem.SetValue(‘Arial’); | |
Date Edit | A date object specifying the item value | ribbonItem.SetValue(new Date (‘03/02/2011’)); | |
Drop-Down Button | - | - | |
Drop-Down Toggle Button |
| ribbonItem.SetValue(true); | |
Drop-Down Gallery | Depends on the RibbonGalleryProperties.ValueType property | ribbonItem.SetValue(14); | |
Gallery Bar | Depends on the RibbonGalleryBarItem.ValueType property | ribbonItem.SetValue(‘highlight’); | |
Option Button |
| ribbonItem.SetValue(true); | |
Spin Edit | A number specifying the item value | ribbonItem.SetValue(14); | |
Template Item | - | - | |
Text Box | A string specifying the item value | ribbonItem.SetValue(‘Ann Devon’); | |
Toggle Button |
| ribbonItem.SetValue(true); |