my DataSource is a stored procedure so I use this code
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
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
cmbProjectStatus.Properties.DataSource = psProject.GetProjectStatus();
02
cmbProjectStatus.Properties.DropDownRows =7;
03
cmbProjectStatus.Properties.ForceInitialize();