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

GridView - Server Page Loading Grouping

5 Answers 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
JIG
Top achievements
Rank 1
JIG asked on 31 Mar 2017, 07:32 AM

Hi,

We have an issue with the server page loading on the gridview. When grouping on multiple fields the application crashed with an OverflowException on the IQueryable. Besides the IQueryable we are also using a custom 'PagingBeforeGroupingQueryableCollectionView' (See attachment).

After adding the second grouping, the Queryable expression is as follows:

{value(IdeaBlade.EntityModel.EntityQueryProxy`1[TableX]).Where(t => ((Convert(t.ObjectTypeID) == Convert(Convert(value(ScreenX).SelectedObjectType.ObjectTypeID))) AndAlso value(ScreenX+<>c__DisplayClass6).moduleIDs.Contains(t.ModuleID))).Where(x => (((x.DescEN.StartsWith("[") OrElse x.DescFR.StartsWith("[")) OrElse x.DescGE.StartsWith("[")) OrElse x.DescNL.StartsWith("["))).OrderBy(x => x.CreationDate).Take(100).GroupBy(item => item.ObjectName).OrderBy(group => group.Key).Select(group => new AggregateFunctionsGroup() {Key = group.Key, ItemCount = group.Count(), HasSubgroups = True, Items = value(IdeaBlade.EntityModel.EntityQueryProxy`1[TableX]).Where(t => ((Convert(t.ObjectTypeID) == Convert(Convert(value(ScreenX).SelectedObjectType.ObjectTypeID))) AndAlso value(ScreenX+<>c__DisplayClass6).moduleIDs.Contains(t.ModuleID))).Where(x => (((x.DescEN.StartsWith("[") OrElse x.DescFR.StartsWith("[")) OrElse x.DescGE.StartsWith("[")) OrElse x.DescNL.StartsWith("["))).OrderBy(x => x.CreationDate).Take(100).Where(item => (item.ObjectName == group.Key)).GroupBy(item => item.ObjectField).OrderBy(group => group.Key).Select(group => new AggregateFunctionsGroup() {Key = group.Key, ItemCount = group.Count(), HasSubgroups = False, Items = group})})}

 

Statement results in "An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll"

I attached some Images with some more information.

 

 

 

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Apr 2017, 07:41 PM
Hi Marnix,

I am afraid that with the provided information I cannot confirm the exact cause for this error. May I kindly ask you to clarify whether this StackOverflowException depends on the number of properties defined? Also, since you are using a custom QueryableCollectionView, would it be possible for you to try reproducing the exception with the default implementation of the QCV? Are you experiencing the same issue with it?

Thank you in advance for your cooperation.

Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
JIG
Top achievements
Rank 1
answered on 18 Apr 2017, 12:52 PM

Hi 

Tried to reproduce the problem with a IQuerable, without any QCV.
We are getting the same result when grouping on 2 columns.

"System.StackOverflowException was unhandled
Message: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll"

 

Code snippet:

var query =(IEntityQuery<TblLstTranslation>)_dataService.GetManager().TblLstTranslation.Where(t => t.ObjectTypeID =(short)SelectedObjectType.ObjectTypeID && moduleIDs.Contains(t.ModuleID));
 
 if (!IsTranslated)
{
  query = query.Where(x => x.DescEN.StartsWith("[")
  || x.DescFR.StartsWith("[")
  || x.DescGE.StartsWith("[")
  || x.DescNL.StartsWith("["));}
 
Translations = query.OrderBy(x => x.CreationDate).AsQueryable<TblLstTranslation>();

 

Kind Regards

 

0
Stefan
Telerik team
answered on 21 Apr 2017, 11:32 AM
Hi Marnix,

Thanks for the clarification and the snippet provided.

Unfortunately, I still cannot confirm whether this exception is due to some server side logic or not. As already asked in my previous reply, can you please test the application on your end whether the count of the properties matters in reproducing the issue?

Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
JIG
Top achievements
Rank 1
answered on 24 Apr 2017, 11:35 AM

Hi Stefan,

"can you please test the application on your end whether the count of the properties matters in reproducing the issue"

I tried with 2 properties (see grid), and I'm getting the same behavior. I attached some information about the current setup I'm testing with. We are using an IQueryable property which we attach to the Itemssource of the grid. (See screenshot 1 - 2 - 3)

Grouping on one property at the same time is working fine. But drag and drop the second (Objectfield) results into 'Process is terminated due to StackOverflowException'. I'm pasting the query IQueryable is generating on the bottom as those are very big and not possible to attach a TXT file..

 

Note; I'm not able to run / test  the telerik demo - Server page, sort, Group and filter correctly. I'm getting the error 'The underlying provider failed on Open' (see attached picture 'TelerikDemo.png')

 

First grouping
87 : 24/04/2017 13:09:49 : Guest - 2 : IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor:ExecuteQuery : Fetch ... value(IdeaBlade.EntityModel.EntityQueryProxy`1[CSD4.Data.ModuleModel.TblLstTranslation]).Where(t => ((Convert(t.ObjectTypeID) == 2) AndAlso value(System.Collections.Generic.List`1[System.Byte]).Contains(t.ModuleID))).Where(x => (((x.DescEN.StartsWith("[") OrElse x.DescFR.StartsWith("[")) OrElse x.DescGE.StartsWith("[")) OrElse x.DescNL.StartsWith("["))).OrderBy(x => x.CreationDate).GroupBy(item => item.ObjectName).OrderBy(group => group.Key).Select(group => new AggregateFunctionsGroup() {Key = group.Key, ItemCount = group.Count(), HasSubgroups = False, Items = group})

Second grouping
89 : 24/04/2017 13:10:33 : Guest - 2 : IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor:ExecuteQuery : Fetch ... value(IdeaBlade.EntityModel.EntityQueryProxy`1[CSD4.Data.ModuleModel.TblLstTranslation]).Where(t => ((Convert(t.ObjectTypeID) == 2) AndAlso value(System.Collections.Generic.List`1[System.Byte]).Contains(t.ModuleID))).Where(x => (((x.DescEN.StartsWith("[") OrElse x.DescFR.StartsWith("[")) OrElse x.DescGE.StartsWith("[")) OrElse x.DescNL.StartsWith("["))).OrderBy(x => x.CreationDate).GroupBy(item => item.ObjectName).OrderBy(group => group.Key).Select(group => new AggregateFunctionsGroup() {Key = group.Key, ItemCount = group.Count(), HasSubgroups = True, Items = value(IdeaBlade.EntityModel.EntityQueryProxy`1[CSD4.Data.ModuleModel.TblLstTranslation]).Where(t => ((Convert(t.ObjectTypeID) == 2) AndAlso value(System.Collections.Generic.List`1[System.Byte]).Contains(t.ModuleID))).Where(x => (((x.DescEN.StartsWith("[") OrElse x.DescFR.StartsWith("[")) OrElse x.DescGE.StartsWith("[")) OrElse x.DescNL.StartsWith("["))).OrderBy(x => x.CreationDate).Where(item => (item.ObjectName == group.Key)).GroupBy(item => item.ObjectField).OrderBy(group => group.Key).Select(group => new AggregateFunctionsGroup() {Key = group.Key, ItemCount = group.Count(), HasSubgroups = False, Items = group})})

 

Thanks for the support.

 

 

 

0
Stefan
Telerik team
answered on 27 Apr 2017, 08:31 AM
Hello Marnix,

Thanks for your cooperation.

Unfortunately, I cannot relate this behavior to any known issue of RadGridView. Can you please share some details on the database engine that you are using, so I can investigate whether any known problems have been previously reported? May I also kindly ask you to try a similar approach but without the usage of RadGridView? Is the issue still reproducible?

Best Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
JIG
Top achievements
Rank 1
Answers by
Stefan
Telerik team
JIG
Top achievements
Rank 1
Share this question
or