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");
"test2");
"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
Terese,
When the UltraCombo is used as an editor in the UltraGrid, the selection/value will be the value of the cell that is used as the editor. You would get that value the same way as you get the value for any other cell in your grid by calling GetCellValue on the relevant row.
Hi Joe,
Sir Please help me with my doubt.
I have created an ultra combo editor inside my datagrid in visual studio 2008-vb.net
How can I know if any item inside this ultra combo editor in datagridview is selected?
How to get the values/text of those checked items??
Please reply
Hello Joe,
Thank you for your feedback and for sharing this with us. We believe that the other community members could benefit from such threads.
Please feel free to let me know if a question about our toolset comes up on your mind.
I've fixed the issue and it has nothing to do with the code. The infragistics2.Win.UltraWinEditors.dll that I used was out of date.
What I did to fix this issue was, update infragistics license to 10.2.20102.2058 and attached a new dll file.
Thanks,
Joe
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.