Rad Grid View Exception (Caused by Validation Pop-Up)

6 posts, 0 answers
  1. Jeff Weber
    Jeff Weber avatar
    3 posts
    Member since:
    Sep 2009

    Posted 13 Jul 2011 Link to this post

    We are using the Rad Grid View in our application.

    We are experiencing an intermittent exception that seems to be related to the display of the validation message.

    When in edit mode, if we move the mouse around causing the validation message to show and hide, it will eventually throw a nasty exception (see below)

    Seems related to the visual state manager controlling the validation message.

    Any ideas anyone?

    Here is the exception detail:
    Microsoft JScript runtime error: Unhandled Error in Silverlight Application Cannot resolve TargetProperty (Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color) on specified object.   at MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference, String StateName, Boolean useTransitions, Boolean& refreshInheritanceContext)
       at System.Windows.VisualStateManager.GoToState(Control control, String stateName, Boolean useTransitions)
       at System.Windows.Controls.ToolTip.OpenPopup()
       at System.Windows.Controls.ToolTip.OnIsOpenChanged(Boolean isOpen)
       at System.Windows.Controls.ToolTip.OnIsOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
       at System.Windows.Controls.ToolTipService.OpenAutomaticToolTip(Object sender, EventArgs 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)

    Here is a snippet of XAML that shows how we are using the gridview. Note, the "OrderGrade" column, while in edit mode, is what caused the exception, but pretty sure it's not the only column with the issue.

     <telerik:RadGridView  Grid.Row="1" ItemsSource="{Binding OrderGrades, Mode=TwoWay}" AutoGenerateColumns="False" IsBusy="{Binding Path=IsBusy}"
                                 GroupPanelStyle="{StaticResource GridViewGroupPanel}" telerikGridViewHeaderMenu:GridViewHeaderMenu.IsEnabled="True"
                                 SelectedItem="{Binding SelectedOrderGrade, Mode=TwoWay}" IsReadOnly="True" attachedBehaviors:SetSingleRowAdd.IsEnabled="True" ActionOnLostFocus="None">
                <telerik:RadGridView.Columns >
                    <telerik:GridViewToggleRowDetailsColumn />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderGradeName, Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}">
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{StaticResource Translation.OrderGrade}" Foreground="{StaticResource Heading1FontBrush}" />
                        </telerik:GridViewDataColumn.Header>
                        ...

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 14 Jul 2011 Link to this post

    Hi,

     Can you post more info about the grid version? Is it our just released Q2 2011?

    Regards,
    Vlad
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Jeff Weber
    Jeff Weber avatar
    3 posts
    Member since:
    Sep 2009

    Posted 14 Jul 2011 Link to this post

    Well, I kind of figured out the issue.  We actually had our own implicit style declared for ToolTips.  Apparently our implicit style and the Telerik style were "colliding" and causing an intermittent bug.

    When I got rid of our implicit style, the bug went away.  Kinda sucks, though that we can't use an implicit style for tool tips in our app simply because we are using the rad grid view.
  4. Tim
    Tim avatar
    20 posts
    Member since:
    Aug 2011

    Posted 28 Sep 2011 Link to this post

    We are having a similar issue.  Our RadGridView is nested inside a Telerik RadDocking.DocumentHost.  Each column has a tooltip defined via the GridViewDataColumn's ToolTipTemplate in XAML.  The templates are defined as static resources.

    When we resize the dock panel smaller and release, the tooltips sometimes still fire even though the mouse pointer is not over the grid because the dockpanel just covered up a portion of it.  A little weird, but the bad thing is the intermittent exception... 

    We are using version 2011.2.9201040

    NullReferenceException at....

    at System.Windows.Controls.ToolTipService.OpenAutomaticToolTip(Object sender, EventArgs 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
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 29 Sep 2011 Link to this post

    Hi,

     It seems this is a known issue in Silverlight:
    http://forums.silverlight.net/p/153241/343278.aspx

    All the best,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Tim
    Tim avatar
    20 posts
    Member since:
    Aug 2011

    Posted 29 Sep 2011 Link to this post

    Vlad,

    Thanks for responding.  Unfortunately, it seems that link provided has little to do with the issue we are reporting, for four reasons:

    1. The link is about a known issue in Silverlight which prevents you from using a Style Setter to set the value of the tooltip.  You can use a Style, but you must set value directly, not with the Setter.  (This is true.  I have run into this with and without Telerik tools.  We do not use a Style Setter to set the value.)  Different issue.
    2. The link is about a problem that fails 100% of the time.  Which is true.  The issue we are posting is intermittent.  Different issue.
    3. The link discusses an exception (Value does not fall within expected range).  The issue we are posting about is a NullReferenceException.  Different Issue.
    4. The link discusses a stack trace which is different than ours.  Our problem occurs at .OpenAutomaticToolTip.  The link's exception occurs on .SetValue.  Different Issue.

     

    To be clear...  We are using a Telerik feature:  GridViewDataColumn.ToolTipTemplate.  We are not using a Style Setter anywhere.  So the link simply does not apply (unless maybe you are talking about internal Telerik code).

    For now, we are going to try to catch the exception and see if we can just eat it.  Let us know if you think of any ideas on what this could be.

    Thanks!


Back to Top