Back to Devexpress

RadioGroupItemCollection.GetItemByValue(Object) Method

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-radiogroupitemcollection-dot-getitembyvalue-x28-system-dot-object-x29.md

latest2.8 KB
Original Source

RadioGroupItemCollection.GetItemByValue(Object) Method

Gets a radio group item by its value.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public RadioGroupItem GetItemByValue(
    object value
)
vb
Public Function GetItemByValue(
    value As Object
) As RadioGroupItem

Parameters

NameTypeDescription
valueObject

The value to search.

|

Returns

TypeDescription
RadioGroupItem

The RadioGroupItem object with the value specified.

|

Remarks

The method returns a RadioGroupItem from the RepositoryItemRadioGroup.Items collection according to its value.

The item’s 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, null is returned.

The RadioGroupItemCollection.GetItemIndexByValue method returns the item’s position within the collection according to the item’s value.

See Also

Items

RadioGroupItem

Value

RadioGroupItemCollection Class

RadioGroupItemCollection Members

DevExpress.XtraEditors.Controls Namespace