I have a editable autocomplete combo bound to an IEnumerable under the current 2014.1 version.Everything works fine.. however after I change the value three times by selecting different values in the combo I get this error:
System.NullReferenceException: "Object reference not set to an instance of an object." at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Controls.Editors.ComboEditorBase`2.InvalidateDropDownPosition(Boolean adjustHeight) at Infragistics.Controls.Editors.ComboEditorBase`2.DataManager_DataUpdated(Object sender, EventArgs e) at Infragistics.DataManagerBase.OnDataUpdated() at Infragistics.DataManager`1.ApplyClientDataManipulations(Boolean setSortedFilteredDataSource) at Infragistics.DataManager`1.ResolveFilteredSortedPagedDataSource() at Infragistics.DataManagerBase.InvalidateSortedFilterdDataSource() at Infragistics.DataManagerBase.ClearCachedDataSource(Boolean invalidateTotalRowCount) at Infragistics.DataManager`1.ClearCachedDataSource(Boolean invalidateTotalRowCount) at Infragistics.DataManagerBase.set_Filters(RecordFilterCollection value) at Infragistics.Controls.Editors.ComboEditorBase`2.SearchAndFilterItemsByText(String text, Boolean performAutoComplete) at Infragistics.Controls.Editors.ComboEditorBase`2.ProcessEditorText(Boolean allowDropDown, Boolean attemptAutoComplete) at Infragistics.Controls.Editors.ComboEditorBase`2.ProcessEditorText(Boolean allowDropDown) at Infragistics.Controls.Editors.ComboEditorBase`2.Editor_LostFocus(Object sender, RoutedEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Hello Greg,
Thank you for your post!
I have been looking into your issue and have created a small sample application to test the functionality you have mentioned and I was not able to reproduce the issue.
Currently the XamComboEditor supports collections of type IEnumerabe with complex properties. For example ObservableCollection<Person>.
I am attaching the sample application I have been testing with for your reference. Would you please modify it with the functionality you are using, so it reproduces the issue. This way I would be able to further investigate this issue for you.
Thank you for the cooperation. Looking forward to hearing from you.
It's probably that I'm not implementing the complex properties. I found the error message really confusing though.
I have since switched to the standard Silverlight combobox which seems to work ok with the same collection.
Maybe I will revisit this in the future if the standard combobox doesn't suit my needs.
Thank you for your help,
Greg
Hi Greg,
I'm not quite sure what complex properties you think you should implement but judging by the stack trace this might very well be a issue with the control. We've done a major refactoring of some areas of this control in 14.1 and this might be the cause for the exception you;re seeing. The easiest way to check this out is to try it out with an older version - i.e. 13.2 .
We'll be glad if you could find the time to put a small sample where this issue is easily reproducible. If it is too much effort to isolate the issue in another solution here few questions that might give us a clue what exactly is going wrong:
We would appreciate any feedback on this so we could hunt it down and fix it.
Thanks in advance,
Konstantin,
The xamcombo editor is displayed in a childwindow in the top part of the second tab of a tab control.
It is bound to a collection my viewmodel object. The collection is originally of type EntitySet from WCF RIA but I have tried casting it as IEnumerable and doing .ToList() but it does not help.
Also, I noticed I get a second different error if I try to bind the list to a static resource. The first item loads then I get an error message.
Here is some XAML:
<controls:ChildWindow.Resources>
<lookup:FormNames x:Key="formNames" />
</controls:ChildWindow.Resources>
<controls:ChildWindow.DataContext>
<viewmodel:SelectFormsForPackingListViewModel x:Name="MyViewModel" AutoLoad="True"/>
</controls:ChildWindow.DataContext>
<Grid x:Name="LayoutRoot" Margin="2" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<controls:TabControl Grid.Row="0" VerticalAlignment="Stretch" SelectedIndex="{Binding CurrentTabIndex}" VerticalContentAlignment="Stretch" SelectionChanged="TabControl_SelectionChanged" >
<controls:TabItem Header="Prepared">
</controls:TabItem>
<controls:TabItem Header="Unprepared">
<Grid>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition></RowDefinition>
<StackPanel Grid.Row="0" Margin="0,5,0,15" >
<StackPanel Orientation="Horizontal">
<TextBlock>Form Type</TextBlock>
<!-- For some reason standard combobox works with static resource but not infragistics (IG bug?)
ItemsSource="{Binding Source={StaticResource formNames}, Path=Lookup}"-->
<ig:XamComboEditor ItemsSource="{Binding FormNameLookup}"
SelectedValuePath="FormMenuIndex"
DisplayMemberPath="FormMenuItem"
Width="220" Margin="10,0,20,0" />
Thanks for the details Greg.
My suspicion for the cause for the first issue is that you're binding it to an EntitySet. We have in interal issue reported for a similar scenario. I'll check it out and get back to you.
For the second error you've observed - so you mean you're opening the drop down the first item is shown and then you get an exception is that right ?
I don't think that the issue is related with the fact that the its ItemsSource gets set through binding to StaticResource.
Thanks again for the details and the xaml snippets,