Hi Everyone,
I upgraded to ASP.NET AJAX 2016 Q1 today, and I've been receiving this error once in awhile. I'm not sure exactly what causes it.
I don't see it list any of my code. It does only occur on one page (so far). In this page I do two things related to grouping. In the 'DetailTableDataBind' event I group by a specific field:
e.DetailTableView.GroupByExpressions.Clear();
var gridGroupByExpression = new GridGroupByExpression();
gridGroupByExpression.GroupByFields.Add(new GridGroupByField { FieldName = "FIELD NAME", SortOrder = GridSortOrder.Descending });
gridGroupByExpression.SelectFields.Add(new GridGroupByField { FieldName = "FIELD NAME", HeaderText = "HEADER TEXT", Aggregate = GridAggregateFunction.Avg, FormatString = "{0:0}" });
gridGroupByExpression.SelectFields.Add(new GridGroupByField { FieldName = "FIELD NAME", HeaderText = "HEADER TEXT", Aggregate = GridAggregateFunction.Avg });
e.DetailTableView.GroupByExpressions.Add(gridGroupByExpression);
And in the 'GroupsChanging' event, I disable paging if at least one column is being grouped by:
(sender as RadGrid).AllowPaging = !(e.Action != GridGroupsChangingAction.Ungroup || e.TableView.GroupByExpressions.Count > 1);
Here's the full exception:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x80004005): Multiple controls with the same ID '_LightweightGroupPlaceHolder' were found. FindControl requires that controls have unique IDs.
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls)
at System.Web.UI.Control.FindControl(String id, Int32 pathOffset)
at Telerik.Web.UI.GridGroupPanel.AddLightweightGroups(GridTableView tableView, Int32 level, Int32& tableIndex)
at Telerik.Web.UI.GridGroupPanel.InitializeIn(RadGrid grid, Boolean FromViewState)
at Telerik.Web.UI.RadGrid.CreateGroupPanel(Control container)
at Telerik.Web.UI.RadGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Telerik.Web.UI.GridBaseDataList.get_Controls()
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)