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

GroupFooterTemplate issue

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yishen
Top achievements
Rank 1
Yishen asked on 20 Nov 2012, 10:13 AM
Hello all,

I have encountered a problem while using the GroupFooterTemplate in RadGrid. I have implemented a RadGrid using GroupFooterTemplate according the documentation that I have found at your web site. Here is the link to the documentation: 
Group Header and Footer Templates

In the GroupFooterTemplate, I used several <td></td> together with labels to show the footer items. I have to use GroupFooterTemplate because a checkbox must be displayed in one of the footer columns.

The issue occured, when I used Aggregate="Custom" as follows
<telerik:GridBoundColumn UniqueName="OrderNo" DataField="OrderNo" HeaderText="Order No." Aggregate="Custom" />

The error message that I got is as follows:

An entry with the same key already exists.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: An entry with the same key already exists.

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 
[ArgumentException: An entry with the same key already exists.] 
System.Collections.Specialized.ListDictionary.Add(Object key, Object value) +6236829
Telerik.Web.UI.GridBoundColumn.PopulateAggragateInGroupFooter(TableCell cell, Object result) +142
Telerik.Web.UI.GridBoundColumn.ApplyAggregates(TableCell cell, String footerText) +2485
Telerik.Web.UI.GridBoundColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem) +637
Telerik.Web.UI.GridGroupFooterItem.Initialize(GridColumn[] columns) +262
Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +964
Telerik.Web.UI.GridItemBuilder.CreateGroupFooterItem(GridGroupingContext group) +179
Telerik.Web.UI.GridItemBuilder.HandleGrouping(GridGroupingContext group, GridEnumerableBase enumerable, Boolean& isGroup, Boolean& isGroupFooter) +204
Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +323
Telerik.Web.UI.GridItemBuilder.CreateGroupSubItems(GridGroupingContext group, GridEnumerableBase enumerable) +783
Telerik.Web.UI.GridItemBuilder.HandleGrouping(GridGroupingContext group, GridEnumerableBase enumerable, Boolean& isGroup, Boolean& isGroupFooter) +81
Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +323
Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +193
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +2170
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +832
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
Telerik.Web.UI.GridTableView.PerformSelect() +38
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
Telerik.Web.UI.GridTableView.DataBind() +369
Telerik.Web.UI.RadGrid.DataBind() +173
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +4085
Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +183
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

If I used Aggregate="Sum" or Aggregate="Count" instead of Aggregate="Custom" , the web application could run without error. Could you please tell me how to use aggregate custom correctly while using the GroupFooterTemplate?

Many thanks in advance!



Greetings,
Y. Lueg

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 23 Nov 2012, 09:15 AM
Hello Yishen,

Indeed I verified that the described issue exists into the current version of the controls. Our developers are aware and they will start working on the resolution of this issue. The fix will be available into the Q3 SP1 version of the controls. Please, excuse us for the temporary inconvenience.

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Yishen
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or