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
390
How to Search Items Contain in DropDown
posted

Hi All I am very new in Infragistics Controls

I want to serch item from ultracomboEditor

i tried

 Infragistics.Win.ValueListItem items = new Infragistics.Win.ValueListItem();
 items.DataValue = "ValueListItem3";
 items.DisplayText = "Ghanshyam3";

MessageBox.Show(ultraComboEditor1.Items.Contains(items).ToString());

gets result : false

 how to serch items,

Any one reply would get great apprecite

 

 

  • 469350
    Suggested Answer
    Offline posted

    I'm not sure what you are trying to do here, exactly. What you have here doesn't work because you are creating a new ValueListItem and that item is not in the collection of ValueListItems for the combo.

    It looks to me like you are trying to find an item with the same DisplayText and same Value as the item you created. There's no way to do that with Contains.

    You will have to loop through the Items collection to find an item that matches the values you want.