RadioGroupItemCollection.GetItemIndexByValue(Object) Method
Gets the index of a radio group item by its value.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
value | Object | The value to search. |
Returns
Type | Description |
---|---|
Int32 | The integer value that specifies the item’s index. |
Remarks
The method returns the index of the item’s position within the RepositoryItemRadioGroup.Items collection according to its value.>
The item can be accessed by the RadioGroupItemCollection.Item property and its value can be obtained via the RadioGroupItem.Value property. Note: for the editor to function correctly, items in the collection must be unique objects. If both the value parameter and the RadioGroupItem.Value field are null, the method returns the item.
If there is no match between the value parameter and any item’s RadioGroupItem.Value field, -1 is returned.
The RadioGroupItemCollection.GetItemByValue method returns the RadioGroupItem object according to its value.