Ticket T551140
Visible to All Users

RepoItemSearchLookupEdit with MultiSelect in XTraGrid

created 8 years ago

Hey,

i have a simple winforms app with a grid to list all my customers. I want to have a column to select multiple countries (some customers are available in multiple countries). I thought i can use a repositoryitem searchlookupedit with multiselect, but all my tries are not working yet. Can you give me an example of this (Grid, Column, Editor, Binding, ViewModel)?

Thank you
Nico

Answers approved by DevExpress Support

created 8 years ago

Hello,
LookUpEditors are intended to choose a single value. Use the CheckedComboBoxEdit editor to select several entries. I've attached a simple project demonstrating how it works.
CheckedComboBoxEdit displays items that exist in its Items collection. So, make sure that all necessary countries are added to this collection.

Drop me a line if you have any further questions.

    Show previous comments (3)
    Andrew Ser (DevExpress Support) 8 years ago

      Hi Nico,
      CheckedComboBoxEdit supports the incremental search. Open its popup and start typing "g" to see Germany. The editor will immediately scroll the first found entry.
      Is this option suitable for your scenario?

        Hey Andrew,

        i tried the incremental search and showed my customer, but unfortunately, its not enough for them. They want the search and filter possibility like it is in the search lokup edit… How would you do this? Manually with a popupEdit?

        Andrew Ser (DevExpress Support) 8 years ago

          Hi Nico,
          Yes, you are right. The easiest approach would be using PopupContainerEdit with a grid in its PopupContainerControl. See this approach in action in the How to provide the MultiSelect functionality for GridLookUpEdit example. You can make the inner grid look like a grid in SearchLookUpEdit by showing the FindPanel. Enable the GridView.OptionsFind.AlwaysVisible option for this.
          Please try it and let me know how it goes.

          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.