LookUpEdit.GetSelectedDataRows() Method
Returns data source records associated with the current selection.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v25.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Returns
Type | Description |
---|---|
Object | Data source records associated with the current selection. |
Remarks
In multiple selection mode, the GetSelectedDataRows
method behaves as follows:
Returns data source records associated with the current selection if the EditValueType is set to
LookUpEditValueType.ValueList
.// Enable `ValueList` multiple selection mode. lookUpEdit1.Properties.EditValueType = LookUpEditValueType.ValueList; // Display the checkbox selector column. lookUpEdit1.Properties.AddCheckBoxSelectorColumn(); // Select the first three items in the lookup editor. lookUpEdit1.EditValue = new List<int>(){ 0, 1, 2 }; object selectedDataRow = lookUpEdit1.GetSelectedDataRow(); // Returns the first matching data source record. object selectedDataRows = lookUpEdit1.GetSelectedDataRows(); // Returns data source records associated with the current selection.
Returns null (Nothing in Visual Basic) if the EditValueType is set to
LookUpEditValueType.CSVString
.// Enable `CSVString` multiple selection mode. lookUpEdit1.Properties.EditValueType = LookUpEditValueType.CSVString; // Display the checkbox selector column. lookUpEdit1.Properties.AddCheckBoxSelectorColumn(); // Select the first three items in the lookup editor. lookUpEdit1.EditValue = "0,1,2"; object selectedDataRow = lookUpEdit1.GetSelectedDataRow(); // Returns null. object selectedDataRows = lookUpEdit1.GetSelectedDataRows(); // Returns null.
If multiple selection is disabled, GetSelectedDataRows
returns a list that contains a single record that matches the currently selected item.
See Also