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

[Solved] Q2- SL3 - Error caused when using the group functionality

8 Answers 196 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
PW
Top achievements
Rank 1
PW asked on 22 Jul 2009, 12:42 AM
I am using the latest release of Silverlight 3 (July 1, 2009) and am experiencing some strange behavior when trying to use the grouping in the gridview. Upon trying to group I sometimes (at least 50% of the time) will wind up with two groups for each item that was supposed to be grouped. For example, if I have a column in the grid like City there would be two groups formed for each city. When I try to expand one of the groups then I get the following error:

Microsoft JScript runtime error: Unhandled Error in Silverlight Application
Code: 4004    
Category: ManagedRuntimeError       
Message: System.ArgumentException: Duplicate key detected!
Parameter name: key
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection`2.AddKey(TKey key, Int32 index)
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection`2.InsertItem(Int32 index, TItem item)
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection`2.AddRange(RadKeyedCollection`2 collection)
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.CreateChildHeightsCache(PhysicalHeightsCacheCollection result, Int32 indexInGroup, GroupRecord parentGroup, Int32 grIndex)
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.CreateRecordsHeightsCache(IList`1 records, Int32 firstIndexInGroup, Boolean isCalledByParent)
   at Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.RefreshItemsPhysicalHeightsCache()
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnRefreshScrollExtent()
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnRefreshScrollExtent()
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.UpdateRowHeight(IRowItem child)
   at Telerik.Windows.Controls.GridView.GroupVirtualizingPanel.UpdateRowHeight(IRowItem child)
   at Telerik.Windows.Controls.GridView.BaseVirtualizingPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)    

On the occasion that the groups are each only there once everything works as expected.

Any suggestions? I am binding to a very simple observable collection which is created at run time. In the silverlight 2 build of the same application the grouping works without any problems.

Thanks in advance for your help.

8 Answers, 1 is accepted

Sort by
0
PW
Top achievements
Rank 1
answered on 22 Jul 2009, 09:43 PM
As an add on to this item...if I turn off the DataLoadMode = "Asyncronous" the grouping works without error. When I turn the Asyncronous back on I get the same error.

Please Advise.
0
Stefan Dobrev
Telerik team
answered on 24 Jul 2009, 02:43 PM
Hello Darcy,

Thanks for reporting this. We are already aware of this problem and we are preparing a fix for that will be available in the service pack release, targeted for first week of August.

Best wishes,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
FieldTRAKS
Top achievements
Rank 1
answered on 04 Aug 2009, 12:32 PM
can i get this fix by taking the binary from the nightly build??
0
Hristo
Telerik team
answered on 04 Aug 2009, 03:28 PM
Hi Dave Branson,

The fix for this issue will be shipped with the Q2 SP1 which is expected next week.

Best wishes,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Martin Johnsson
Top achievements
Rank 1
answered on 05 Oct 2009, 02:51 PM
Hi

I am using version 2009.2.813.1020, and I am still experiencing the same problem

Regards
Martin
0
Vlad
Telerik team
answered on 05 Oct 2009, 03:28 PM
Hi Martin,

Can you try our latest internal build instead?

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Martin Johnsson
Top achievements
Rank 1
answered on 19 Oct 2009, 07:29 AM
Hi

I am now using your latest build but the error remains

Regards
Martin
0
Vlad
Telerik team
answered on 20 Oct 2009, 12:06 PM
Hello Martin,

Can you send us an example (via support ticket) where this error can be reproduced and debugged?

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
PW
Top achievements
Rank 1
Answers by
PW
Top achievements
Rank 1
Stefan Dobrev
Telerik team
FieldTRAKS
Top achievements
Rank 1
Hristo
Telerik team
Martin Johnsson
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or