Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
DroppedDown = true Not Working
posted

In the Enter event of the UltraComboEditor i have set the DroppedDown property to true in the hope that it would dropdown the list of all items but it does not. Any help would be appreciated. i have copied the code i am using in the event below:

 private void briefeePersonUltraComboEditor_Enter(object sender, EventArgs e)
 {
    Infragistics.Win.UltraWinEditors.UltraComboEditor ComboBox = sender as Infragistics.Win.UltraWinEditors.UltraComboEditor;
    ComboBox.DroppedDown = true;
    if (ComboBox.Items.Count < 2)
    {
         BLCollection<BLPerson> Collection = BLPerson.CurrrentNonZeroDepartmentPeopleLight;
         ComboBox.DataSource = Collection;
         ComboBox.ValueMember = "Self";
         ComboBox.DisplayMember = "Self";
         ComboBox.AutoComplete = true;
         ComboBox.LimitToList = false;
         ComboBox.SelectedIndex = ComboBox.FindStringExact(this.SelectedBriefing.BriefeePerson.ToString());
    }
  }

  • 469350
    Offline posted

    Hi,

        I tried this out, setting DroppedDown to true in the Enter event without all the other code you have here it works fine.

        I suspect the problem lies in some of the code in your 'if' block. Something you are doing there is probably causing the control to close up again. 

        To be frank, it doesn't make a lot of sense to me to put this kind of code in the Enter event. Why set LimitToList or AUtoComplete every time the control is entered? And it would probably be a better idea to set the DroppedDown property after you set the DataSource and SelectedIndex rather than before. Although, I'm really not sure setting these inside the Enter event is a great idea.