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

System.ArgumentNullException: Value cannot be null

2 Answers 339 Views
GridView
This is a migrated thread and some comments may be shown as answers.
WILLIAM
Top achievements
Rank 1
WILLIAM asked on 06 Sep 2013, 04:35 PM
Hi telerik team,

I've come across a really weird situation and I have not been able to successfully debug it.  I was wondering if you could give me some clues to look for or events to subscribe to try and figure it out.

About the grid:
It has several columns of various types.
All columns are read-only except for one which is a date column
The grid is grouped by the date column
This grid one of several controls in a xaml view.

Our user has found an issue where if she updates the date (I believe either by manually editing the date, or using the date picker).  She immediately clicks on a completely different view (not the view that the grid is part of) and I get the exception below.  It seems that all updating of the field and the underlying datasource all works just find.  Also, this only happens the first time you edit a date.  You can continue to change dates as you wish an with no exceptions; it only happens from the first date change.

I have subscribed to the Cell.LostFocus and GridView.LostFocus events and these are not fired when I get the exception.

Any ideas on how to approach this would be greatly appreciated!!
Thanks

System.ArgumentNullException: Value cannot be null.
Parameter name: element
   at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext()
   at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Telerik.Windows.Controls.GridView.GridViewCell.HandlePendingEdit(UIElement focusedElement)
   at Telerik.Windows.Controls.GridView.GridViewCell.HandlePendingEditOnLostFocus()
   at Telerik.Windows.Controls.GridView.GridViewCell.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)


2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 10 Sep 2013, 05:58 AM
Hi,

We have already fixed a similar issue in our official Q1 2013! What is the version you use in your application?

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
WILLIAM
Top achievements
Rank 1
answered on 10 Sep 2013, 12:39 PM
That's probably be the issue; I think we are still on version 2012 Q4.  I will suggest upgrading.

Thanks again for your help!
Tags
GridView
Asked by
WILLIAM
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
WILLIAM
Top achievements
Rank 1
Share this question
or