This question is locked. New answers and comments are not allowed.
I have a grid bound to a collection. If I invoke something that removes all of the items in the collection, I get a null reference exception with the following call stack, which does not contain any of my code. I get this error 3 times and I had 3 items in my collection. Any thoughts?
Leslie
> Telerik.Windows.Data!Telerik.Windows.Data.TypeExtensions.DefaultValue(System.Type type = null) + 0x1a bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.DefaltValueExpression(System.Type type = null) + 0x20 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(System.Linq.Expressions.Expression instance = null, string memberName = "package", System.Type memberType = null) + 0xa3 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(System.Linq.Expressions.Expression instance = {System.Linq.Expressions.TypedParameterExpression}, string memberName = "package", System.Type memberType = null, bool liftMemberAccessToNull = true) + 0x30 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpressionOverride() + 0x6d bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateMemberAccessExpression() + 0x59 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateLambdaExpression() + 0x2b bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateMemberAccessLambdaExpression(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x7a bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateUntypedMemberAccessFunc(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x4c bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateMemberAccessFunc(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x30 bytes
Telerik.Windows.Data!Telerik.Windows.Data.DataFieldDescriptorExtensions.CreateMemberAccessFunc(Telerik.Windows.Data.IDataFieldDescriptor fieldDescriptor = {Repeat.Common.Controls.CmpGridViewDataColumn}) + 0x7e bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.InitializeMemberAccessFunc() + 0x2e bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.MemberAccessFunc.get() + 0x29 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.GetCellContent(object item = {Repeat.Library.ceEdtCurrentVendorItemCostsBO}) + 0x2c bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewCell.UpdateCellValue() + 0x7f bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewRow.ProcessDataItemPropertyChanged(string propertyName = "") + 0x87 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewRow.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent.AnonymousMethod__1b() + 0x6e bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) + 0x76 bytes
mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) + 0xb bytes
System.Windows.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x2b bytes
System.Windows.dll!System.Windows.Threading.Dispatcher.Dispatch(System.Windows.Threading.DispatcherPriority priority) + 0xcc bytes
System.Windows.dll!System.Windows.Threading.Dispatcher.OnInvoke(object context) + 0xa bytes
System.Windows.dll!System.Windows.Hosting.CallbackCookie.Invoke(object[] args) + 0x16 bytes
System.Windows.Browser.dll!System.Windows.Hosting.ScriptingInterface.InvokeDelegate(System.Windows.Hosting.DelegateWrapper delegateWrapper, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult = {System.Windows.Hosting.NativeMethods.ScriptParam}) + 0x28 bytes
System.Windows.Browser.dll!System.Windows.Hosting.ManagedHost.InvokeDelegate(System.IntPtr pHandle, int nParamCount, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult) + 0xe3 bytes
[Appdomain Transition]
Leslie
<
ce:CmpDataGrid
Grid.Row
=
"1"
x:Name
=
"dgCost"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding bocCurrentCosts}"
HorizontalContentAlignment
=
"Stretch"
VerticalContentAlignment
=
"Stretch"
SelectionMode
=
"Single"
ToolStrip
=
"{Binding ElementName=tsCost}"
IsFilteringAllowed
=
"False"
>
<
ce:CmpDataGrid.Columns
>
<
ce:CmpGridViewDataColumn
DataMemberBinding
=
"{Binding vendordcname, Mode=TwoWay}"
Header
=
"{Binding LStrings._VendorDC, Source={StaticResource Strings}}"
IsReadOnly
=
"True"
/>
<
ce:CmpGridViewDataColumn
UniqueName
=
"package"
Header
=
"{Binding LStrings._Package, Source={StaticResource Strings}}"
IsReadOnly
=
"True"
>
<
ce:CmpGridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Grid
MinWidth
=
"150"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"{Binding PackageDescription, Mode=OneWay}"
TextWrapping
=
"Wrap"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
/>
<
Button
Grid.Column
=
"1"
x:Name
=
"btnFindPackage"
VerticalAlignment
=
"Stretch"
Click
=
"btnGridFindPackage_Click"
Visibility
=
"{Binding IsNewDC, Converter={StaticResource myBoolVisibleConverter}}"
ToolTipService.ToolTip
=
"{Binding LStrings._ItemPackageToolTip, Source={StaticResource Strings}}"
>
<
Image
Source
=
"/Repeat.Common.Controls;component/Assets/SymbolSearch.png"
/>
</
Button
>
</
Grid
>
</
DataTemplate
>
</
ce:CmpGridViewDataColumn.CellTemplate
>
</
ce:CmpGridViewDataColumn
>
<
ce:CmpGridViewDataColumn
DataMemberBinding
=
"{Binding effectivedate, Mode=TwoWay}"
Header
=
"{Binding SStrings._BeginDate, Source={StaticResource Strings}}"
IsVisible
=
"{Binding IsNewDC, Converter={StaticResource myNotConverter}}"
IsReadOnly
=
"True"
/>
<
ce:CmpGridViewDataColumn
UniqueName
=
"uomcost"
DataMemberBinding
=
"{Binding uomcost, Mode=TwoWay}"
Header
=
"{Binding LStrings._Cost, Source={StaticResource Strings}}"
IsReadOnlyBinding
=
"{Binding IsNewDC, Converter={StaticResource myNotConverter}}"
DataFormatString
=
"{}{0:c}"
MinWidth
=
"75"
/>
</
ce:CmpDataGrid.Columns
>
</
ce:CmpDataGrid
>
> Telerik.Windows.Data!Telerik.Windows.Data.TypeExtensions.DefaultValue(System.Type type = null) + 0x1a bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.DefaltValueExpression(System.Type type = null) + 0x20 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(System.Linq.Expressions.Expression instance = null, string memberName = "package", System.Type memberType = null) + 0xa3 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(System.Linq.Expressions.Expression instance = {System.Linq.Expressions.TypedParameterExpression}, string memberName = "package", System.Type memberType = null, bool liftMemberAccessToNull = true) + 0x30 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpressionOverride() + 0x6d bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateMemberAccessExpression() + 0x59 bytes
Telerik.Windows.Data!Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateLambdaExpression() + 0x2b bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateMemberAccessLambdaExpression(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x7a bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateUntypedMemberAccessFunc(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x4c bytes
Telerik.Windows.Data!Telerik.Windows.Data.BindingToExpressionExtensions.CreateMemberAccessFunc(System.Windows.Data.Binding binding = {System.Windows.Data.Binding}, System.Type objectType = {System.RuntimeType}, System.Type memberType = null) + 0x30 bytes
Telerik.Windows.Data!Telerik.Windows.Data.DataFieldDescriptorExtensions.CreateMemberAccessFunc(Telerik.Windows.Data.IDataFieldDescriptor fieldDescriptor = {Repeat.Common.Controls.CmpGridViewDataColumn}) + 0x7e bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.InitializeMemberAccessFunc() + 0x2e bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.MemberAccessFunc.get() + 0x29 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.GetCellContent(object item = {Repeat.Library.ceEdtCurrentVendorItemCostsBO}) + 0x2c bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewCell.UpdateCellValue() + 0x7f bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewRow.ProcessDataItemPropertyChanged(string propertyName = "") + 0x87 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewRow.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent.AnonymousMethod__1b() + 0x6e bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) + 0x76 bytes
mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) + 0xb bytes
System.Windows.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x2b bytes
System.Windows.dll!System.Windows.Threading.Dispatcher.Dispatch(System.Windows.Threading.DispatcherPriority priority) + 0xcc bytes
System.Windows.dll!System.Windows.Threading.Dispatcher.OnInvoke(object context) + 0xa bytes
System.Windows.dll!System.Windows.Hosting.CallbackCookie.Invoke(object[] args) + 0x16 bytes
System.Windows.Browser.dll!System.Windows.Hosting.ScriptingInterface.InvokeDelegate(System.Windows.Hosting.DelegateWrapper delegateWrapper, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult = {System.Windows.Hosting.NativeMethods.ScriptParam}) + 0x28 bytes
System.Windows.Browser.dll!System.Windows.Hosting.ManagedHost.InvokeDelegate(System.IntPtr pHandle, int nParamCount, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult) + 0xe3 bytes
[Appdomain Transition]