Giter Site home page Giter Site logo

devexpress-examples / lookup-editors-combobox-mode-t378371 Goto Github PK

View Code? Open in Web Editor NEW
1.0 56.0 1.0 58 KB

Use LookupEdit and GridLookupEdit controls in combobox mode.

License: Other

C# 49.98% Visual Basic .NET 50.02%
dotnet xtraeditors-library winforms data-editing data-lookup grid-lookup lookup windows-forms combobox-mode

lookup-editors-combobox-mode-t378371's Introduction

WinForms Lookup Editors - Combobox mode

This example shows how to use LookupEdit and GridLookupEdit controls in combobox mode. In this mode, users can type in the text box and enter values that are not in the data source.

In this example, the LookupEdit is bound to an array of strings. The GridLookupEdit is bound to a list of business objects.

Do the following to enable the Combobox Mode:

  • Set the Properties.TextEditStyle property to TextEditStyles.Standard to allow users to type in the text box.

  • Set the GridLookUpEdit control's ValueMember and DisplayMember properties to the same data field (with string values). For the LookUpEdit, these proprties are not specified (set to an empty string).

    gridLookUpEdit1.Properties.ValueMember = "ProductName";
    gridLookUpEdit1.Properties.DisplayMember = gridLookUpEdit1.Properties.ValueMember;
  • Enable the AcceptEditorTextAsNewValue options property, which enables users to enter custom text in the edit box.

  • Handle the ProcessNewValue event to parse entered values and add new records to the lookup’s data source.

Read the following help topic for more information: ComboBox Mode - Enter New Values.

Files to Review

Documentation

See Also

lookup-editors-combobox-mode-t378371's People

Contributors

albertov05 avatar alexgreenz avatar devexpressexamplebot avatar iam0k avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

thiagoluiz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.