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
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
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.