Given this definition:
<ig:XamComboEditor x:Name="productCombo" ItemsSource="{Binding Products}" SelectedItem="{Binding Product, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True}" DisplayMemberPath="ComboDisplayName" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Center" AutoComplete="True" CustomValueEnteredAction="Add" DataObjectRequested="productCombo_DataObjectRequested"/>
I get this exception trying to add an item not currently in 'Products' ie as a consequence of the CustomValueEnteredAction.
A first chance exception of type 'System.Exception' occurred in InfragisticsSL4.Controls.Editors.XamComboEditor.v10.2 System.Exception Can not create a new data item, when there is no ItemSource set. Please make sure that you have hooked up an ItemSource to the XamWebComboEditor. at Infragistics.Controls.Editors.XamComboEditor.CreateItem() at Infragistics.Controls.Editors.XamComboEditor.CommitTextAsSelected(Boolean closeDropDown, Boolean cancelSelection, Boolean moveSelectionToTheEnd, Boolean allowUseOfFocusedItem) at Infragistics.Controls.Editors.XamComboEditor.Editor_LostFocus(Object sender, RoutedEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Hi James,
I apologize this post has not yet been answered by anyone. I was wondering if you found the solution to this issue? If this was never resolved and if you are willing to revisit it, would you be willing to extract your code and XAML into a small Silverlight sample that reproduces the problem? With that sample I can identify what can be done to remove the exception and if you've come across a bug.
Sincerely,
No, it's still a problem. (Although I'm using 10.2, I've not yet upgraded the app)
The attached solution demonstrates the problem. Click in the 'Reference' field & drop down the combo - type a new entry and tab off. I get a JIT debugger window:
[Window Title]
Visual Studio Just-In-Time Debugger
[Main Instruction]
An unhandled exception ('Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.Exception: Can not create a new data item, when there is no ItemSource set. Please make sure that you have hooked up an ItemSource to the XamWebComboEditor.
at Infragistics.Controls.Editors.XamComboEditor.CreateItem()
at Infragistics.Controls.Editors.XamComboEditor.CommitTextAsSelected(Boolean closeDropDown, Boolean cancelSelection, Boolean moveSelectionToTheEnd, Boolean allowUseOfFocusedItem)
at Infragistics.Controls.Editors.XamComboEditor.Editor_LostFocus(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
') occurred in iexplore.exe [2836].
The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?
[V] View process details [Yes, debug iexplore.exe] [No, cancel debugging]
[Expanded Information]
Process Name: C:\Program Files (x86)\Internet Explorer\iexplore.exe
User Name: James-Desktop\James [Elevated]