Skip to main content

VGridRows.GetRowByFieldName(String) Method

Gets a row by the name of the field to which it’s bound.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

Declaration

public virtual BaseRow GetRowByFieldName(
    string fieldName
)

Parameters

Name Type Description
fieldName String

A String value which specifies the name of the field in the data source.

Returns

Type Description
BaseRow

A BaseRow descendant which represents the row bound to the data source field with the specified name. null (Nothing in Visual Basic) if no row is found.

Remarks

The GetRowByFieldName method traverses through the row collection and checks whether the visited row’s RowProperties.FieldName property matches the parameter’s value. Note that any child rows which reside at higher nesting levels are not processed. For example, if the VGridControlBase.Rows collection’s GetRowByFieldName method is used, only the top level rows are processed.

If the processed row is a multi-editor row, the GetRowByFieldName method traverses the row’s MultiEditorRow.Properties collection. If the multi-editor row contains a row item which is bound to the specified field, this multi-editor row is returned.

If a row needs to be searched for at all nesting levels, use the overloaded GetRowByFieldName method which allows specifying whether it’s necessary to recursively scan the row collection.

See Also