We have implemented the MultiSelect mode in the LookUpEdit as an extension. To use it, you will need to add a reference to the DevExpress.Xpf.Grid.Extensions library and assign MultiSelectLookUpEditStyleSettings to the LookUpEdit StyleSettings property. If you wish to select records on a click basis (without the CTRL modifier), customize the editor's PopupContentTemplate and use the OneClickSelectionView as a GridControl view. Please note that the LookUpEdit does not support text editing in the MultiSelect mode.
Question Comments
Added By: Adel Ayyam at: 1/6/2014 2:50:47 PM
Hi Devexpress,
The example is not working as expected when IsTextEditable="True", when searching by some text and selecting corresponding items the selecteditems is always empty ???
Best regards,
Ayyam
Hi Ayyam,
I've created a separate ticket regarding this issue: http://www.devexpress.com/Support/Center/Question/Details/Q465097. We will process your inquiry there.
Thanks,
Alex
This does not work or I do not complete understand it. How do I get the selected items out of it? Can I use the SelectedItem property with a binding? I've tried it but only one item is set, not a list of items if I select more than one.
Added By: Alexander Ch (DevExpress Support) at: 2/7/2014 7:01:14 AMHi Stefan,
I suggest that you use the LookUpEdit.EditValue property to get or set selected items.
Thanks,
Alex
Thanks Alex. It works with the EditValue property.
Maybe you can help me with one additional problem in this context:
I add a delete button to the LookUpEdit.Buttons property. I am not sure, what I should do in the event handler to delete the selection. Currently I am setting the EditValue to Null, which updates the bounded datasource correctly. But when I reopen the editor, the items are still selected.
Hello Stefan,
We accidentally discovered that your initial post was out of scope of our Support Center for a long time. Please accept our sincere apologies for not responding in a timely manner.
I've created a separate ticket on your behalf regarding the task you've mentioned in your message to process it more efficiently: LookUpEdit - Selected items are not cleared when EditValue is set to Null
If this task is still important for you, please find a couple of minutes to refer to that thread.
Thanks,
Andrey