Exception NullReferenceExceprion

2 posts, 0 answers
  1. NSP
    NSP avatar
    3 posts
    Member since:
    Oct 2011

    Posted 11 Sep 2014 Link to this post

    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)
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1251 posts

    Posted 15 Sep 2014 Link to this post


    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.
Back to Top