This is a migrated thread and some comments may be shown as answers.

Exception NullReferenceExceprion

1 Answer 11 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
NSP asked on 11 Sep 2014, 11:13 AM
I have a datagrid with colopicker inside CellTemplate.
            <sdk:DataGrid  Grid.Row="1"
        ItemsSource="{Binding ColumnColors}"
        x:Name="dgColors" IsReadOnly="True"
        AutoGenerateColumns="False" GridLinesVisibility="All">
    <sdk:DataGridTemplateColumn Width="Auto" MinWidth="200" Extensions:GridColumnExtentions.BindableTitle="{Binding DisplayValue, Converter={StaticResource _localizationKeysConverter}, Source={StaticResource _LocalizationKeys}}">
            Grid.Column="1" Grid.Row="5" Margin="5,0,5,5"
            NoColorText="{Binding ResetColor, Converter={StaticResource _localizationKeysConverter}, Source={StaticResource _LocalizationKeys}}"  
            SelectedColor="{Binding ColorBrush, Mode=TwoWay}"
            Visibility="{Binding IsOneColumnChart, Converter={StaticResource _booleanToVisibilityConverter}}" Style="{StaticResource RadColorPickerStyle1}"/>
When I try to expand color picker, Exception thrown.
Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an
instance of an object.
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[]
at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
at Telerik.Windows.Controls.PopupWrapper.AdjustPopupLocation()
at Telerik.Windows.Controls.PopupWrapper.OnPopupOpened(Object sender,
EventArgs 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)

1 Answer, 1 is accepted

Sort by
Pavel R. Pavlov
Telerik team
answered on 15 Sep 2014, 02:29 PM

I tried to reproduce the reported behavior on our side with our latest official release and it seems that the code works as expected. Could you please take a look at the attached project and see if I missed something?

It would be great if you change the code so that the issue can be reproduced and send it back. This will help me to better understand your scenario and further investigate the reasons behind.

Thank you for your kind cooperation.

Pavel R. Pavlov
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Asked by
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question