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

Multiple controls with the same ID '_LightweightGroupPlaceHolder' were found

4 Answers 320 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 16 Jan 2016, 01:39 AM

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)

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 20 Jan 2016, 11:28 PM
Hello,

Try setting different UniqueName for the columns in RadGrid and see if it is helpful.
 
Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Richard Watson
Top achievements
Rank 1
answered on 29 Jan 2016, 09:15 PM

Hi Pavlina,

 Thanks for the reply.  This RadGrid does already have different UniqueNames for each column.  It does have a detail table, however, where some of the columns from the DetailTable also share UniqueNames with the main RadGrid.

 I changed these as well just to be safe, so every UniqueName from the RadGrid and DetailTable columns are unique, but I am still experiencing this error once every 10,000 pageviews or so.

 This only started happening once I upgraded to Telerik ASP.NET AJAX 2016 Q1.

 Just today I tried upgrading to the new 'Latest Internal Build' 'Telerik_UI_for_ASP.NET_AJAX_2016_1_127_Dev_hotfix'.  However, I am still experiencing this issue.

 Has anyone else come across this issue?  Or do you perhaps have any other ideas as to why this would happen?

0
Richard Watson
Top achievements
Rank 1
answered on 30 Jan 2016, 08:07 PM

Just an  FYI I found how to reproduce the error, and I've submitted a bug report ticket

 It only applies to a RadGrid with a detail table in Lightweight rendering, and may only apply to Master pages

 Load the page -> Expand a 'Detail' table -> Group by a column in the Detail table -> Group by a column in the Master table -> Try to expand another 'Detail' table - triggers exception

0
Pavlina
Telerik team
answered on 01 Feb 2016, 01:45 PM
Hi Richard,

Lets continue our communication in the support ticket you have opened in order to avoid duplicate posts.

Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Richard Watson
Top achievements
Rank 1
Share this question
or