The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientRibbon.GetItemValueByName(name) Method

Returns a value of item with the specified name.

Declaration

GetItemValueByName(name: string): any

Parameters

Name Type Description
name string

A string value specifying the name of the item.

Returns

Type Description
any

An Object that is the value of the item with the specified name.

Remarks

The ribbon control's client-side functionality allows items to be accessed programmatically on the client side. The GetItemValueByName method gets a value of an item specified by its name. An item's name is defined by the RibbonTab.Name property.

The type of value returned by the GetItemValueByName method depends on the processed ribbon item type. The table below lists the ribbon items with the returned values.

Editor Name Server-Side Class Return Value
Button RibbonButtonItem null
Check Box RibbonCheckBoxItem true if the item is checked; otherwise false
Color Button RibbonColorButtonItem 16-bit RGB hexadecimal representation of a color in a string format, e.g., #ff0000
Combo Box RibbonComboBoxItem A string specifying the item value
Date Edit RibbonDateEditItem A date object specifying the item value
Drop-Down Button RibbonDropDownButtonItem null
Drop-Down Toggle Button RibbonDropDownToggleButtonItem true if the item is checked; otherwise false
Drop-Down Gallery RibbonGalleryDropDownItem Depends on the RibbonGalleryProperties.ValueType property
Gallery Bar RibbonGalleryBarItem Depends on the RibbonGalleryBarItem.ValueType property
Option Button RibbonOptionButtonItem true if the item is checked; otherwise false
Spin Edit RibbonSpinEditItem A number specifying the item value
Template Item RibbonTemplateItem null
Text Box RibbonTextBoxItem A string representation of the item value
Toggle Button RibbonToggleButtonItem true if the item is checked; otherwise false

You can use the ASPxClientRibbon.SetItemValueByName method to set the value of an item with the specified name.

See Also