Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my DataSource is a stored procedure so I use this code
C#
cmbProjectStatus.Properties.DataSource = psProject.GetProjectStatus();
cmbProjectStatus.Properties.DisplayMember = "ProjectStatus";
cmbProjectStatus.Properties.ValueMember = "id";

until this point the lookupedit work fine and show all data correctly but when I use this code on double click event of bandedGridView1
C#
private void bandedGridView1_DoubleClick(object sender, EventArgs e)
        {
cmbProjectStatus.Text = bandedGridView1.GetRowCellValue(bandedGridView1.FocusedRowHandle, "ProjectStatus").ToString();}

the lookupedit show the value correctly, but when i click on the lookupedit arrow to show all rows then i get only that particular value and to show all rows I must click on lookupedit arrow for the second time to close it and third time to open it then all rows show up.
how i can show all rows from the first time,thanks in advance

What I have tried:

I tried this after line code of the double click event
01
C#
cmbProjectStatus.Properties.DataSource = psProject.GetProjectStatus();

02
C#
cmbProjectStatus.Properties.DropDownRows =7;

03
C#
cmbProjectStatus.Properties.ForceInitialize();
Posted
Updated 27-Jan-19 22:04pm

1 solution

I assume that by setting the text property the LoopUpEdit control filters the data by using the text within the text property.

See the following in the DevExpress Documentation:
LookUpEdit.Text Property | WinForms Controls | DevExpress Help[^]

Especially the following:
RepositoryItemLookUpEdit.SearchMode Property | WinForms Controls | DevExpress Help[^]

Use the SearchMode property to specify how an end-user can search for specific rows by typing within the editor. Possible modes are enumerated by the SearchMode type. You can enable incremental filtering of dropdown rows and automatic completion of text. The incremental search feature is available in SearchMode.AutoComplete and SearchMode.OnlyInPopup modes
 
Share this answer
 
Comments
Mahfoud Bouabdallah 28-Jan-19 12:57pm    
Thank you very much you have been a big help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900