It seems that as of the Q3 release I am no longer able to add a GridGroupByField in a radgrid when the radgrid's datasource is a list of anonymous type objects.
Here is the group by expressions section in the grid:
Here is the group by expressions section in the grid:
<
GroupByExpressions
>
<
tk:GridGroupByExpression
>
<
SelectFields
>
<
tk:GridGroupByField
FieldAlias
=
"Sent"
FieldName
=
"DateSent"
FormatString
=
"{0:D}"
HeaderValueSeparator
=
" on: "
></
tk:GridGroupByField
>
</
SelectFields
>
<
GroupByFields
>
<
tk:GridGroupByField
FieldName
=
"DateSent"
FormatString
=
"{0:D}"
SortOrder
=
"Descending"
></
tk:GridGroupByField
>
</
GroupByFields
>
</
tk:GridGroupByExpression
>
</
GroupByExpressions
>
The following is the anonymous type object declaration from the code behind:
oList.Add(New With {Key .SysID = message.SysID, .From = sender, .Subject = message.EmailSmsLog.Subject, _
.MailIcon = emailIcon, .DateSent = dateSent, .TimeSent = timeSent, _
.IsRead = message.IsRead})
I then assign the datasource of the radgrid as oList
The exception I get is:
Telerik.Web.UI.ParseException: No property or field 'DateSent' exists in type
'Object'
When I take the group by expressions out of the radgrid, everything works fine.
This code worked in previous versions of the control.
Can anyone confirm that this is a problem in Q3.
Thanks
Mike