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.