Ticket Q96464
Visible to All Users

Intuitive way to clear value of LookUpEdit

created 17 years ago

Hi,
I am using your LookUpEdit control to bind to object collections and it is working great, except for one thing: If the user selects an item and then wants to clear out the selection, it is not very intuitive for the user to hit Ctrl-0 or Ctrl-Del. Is there a more intuitive way for the user to clear out the control? Some ways that come to mind are:

  1. a blank top row that they can select (I know this can be done by adding a blank object to the collection, but it would be easier if the control had a top-null row or header row or something built in).
  2. a widget to click to clear selection
  3. being able to hit Delete (without Ctrl) - maybe this can be done through some event
    Thanks,
    Lars
Comments (1)
DevExpress Support Team 17 years ago

    Hi Lars,
    Thank you for the question. To clear the LookUpEdit, you need to set the lookUpEdit1.EditValue property to null. For example, you can create your own button near the LookUpEdit, or handle the KeyDown event in the following manner:

    C#
    private void lookUpEdit1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Delete) { lookUpEdit1.EditValue = null; } }

    Thanks,
    Marina

    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.