Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridLookUpEdit.GetSelectedDataRow() Method

Returns a data source row corresponding to the currently selected edit value.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

public override object GetSelectedDataRow()

#Returns

Type Description
Object

An object that represents a data source row corresponding to the currently selected edit value.

#Remarks

The currently selected value is specified by the editor’s EditValue property. The GetSelectedDataRow method returns the data source row that contains this edit value in the key field, specified by the RepositoryItemLookUpEditBase.ValueMember property.

To get access to other data source rows by their key field values, use the RepositoryItemGridLookUpEditBase.GetRowByKeyValue method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetSelectedDataRow() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also