KB Article A1640
Visible to All Users

Why is the lookup table not scrolled, when I select a row in the dropdown list?

Description:
My LookUp editor is bound to a DataView object. When I select a new value in the dropdown window, how can I obtain the current row? I've tried different methods for retrieving a CurrencyManger from the BindingContext, but the manager's Position is always zero.

Answer:
The lookup list is unbound. Data is loaded into it, but data binding is not used. The following functions of the RepositoryItemLookUpEdit class will help you obtain the lookup data row corresponding to the currently selected value.
GetDataSourceRowByKeyValue
GetDataSourceRowByDisplayValue
See also:
How to obtain the selected row from the LookUp editor
How to implement an incremental search feature for an edit form via the LookUpEdit

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.