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
1059
Cannot Add Data to Ultra Combo Editor
posted

Hi Guys,

The following errors show up when I tried to add data to ultra combo editor:

 

Error Description: Unable to cast object of type 'Infragistics.Win.ValueListItemsCollection.get_Item(Int32 Index)

at Infragistics.Win.ValueListItemMetrics.IntializeValueListItemsSizeCache(Boolean rebuild)

at Infragistics.Win.ValueList.set_CheckBoxStyle(CheckStyle value)

at

Infragistics.Win.UltraWinEditors.UltraComboEditor.APplyCheckedListSettings(ValueList valuelist)

at Infragistics.Win.UltraWinEditors.UltraComboEditor.get_Items()

 

Here is my code: 

objMultiSelect.Items.Clear();       

// Add Items to the multi-select list

            objMultiSelect.Items.Add(

"test1");

            objMultiSelect.Items.Add(

"test2");

            objMultiSelect.Items.Add(

"test3");

// Config objmultiselect list here       

this.objMultiSelect.CheckedListSettings.CheckBoxStyle = Infragistics.Win.CheckStyle.CheckBox;           

this.objMultiSelect.CheckedListSettings.CheckBoxAlignment = ContentAlignment.MiddleLeft;         

this.objMultiSelect.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems;

this.objMultiSelect.CheckedListSettings.ItemCheckArea = ItemCheckArea.Item;      

//Add the value changed event handler          

this.objMultiSelect.ValueChanged += new EventHandler(this.OnValueChanged);

ICheckedItemList list = this.objMultiSelect.Items.ValueList as ICheckedItemList;

list.SetCheckState(0,CheckState.Checked);


Any ideas?

Thanks

Parents
  • 71886
    Offline posted

    Hello joeleesin,

    I think that from the provided code only the line before the last could cause such behavior. I also tested this, have clicked and marked on/off all of the items in the editor and did not get any exception. So this code might not be enough to determine what causes this issue. Please if possible attach a small sample project with your scenario, I will be happy to take a look at it.

Reply Children