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

Multiple controls with the same ID 'rc_' were found. FindControl requires that controls have unique IDs. RadPivotGrid

1 Answer 130 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
asad
Top achievements
Rank 1
asad asked on 31 Oct 2013, 12:49 PM

I am receiving this error if I fetch data from view which has column names in arabic.
Steps to reproduce:

Provide  following query on RadPivotGrid1_NeedDataSource
 
string query = "SELECT شهر, الوفيات FROM [ViewName]";
(sender as RadPivotGrid).DataSource = GetDataTable(query);

if we provide one arabic name this pivot table renders successfully, If there are more than one arabic columns, page crashes with following message

Multiple controls with the same ID 'rc_' were found. FindControl requires that controls have unique IDs.



[HttpException (0x80004005): Multiple controls with the same ID 'rc_' were found. FindControl requires that controls have unique IDs.]
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +233
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +311
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +306
   System.Web.UI.Control.FindControl(String id) +12
   Telerik.Web.UI.PivotGridFieldsWindow.AddAttributesToRender(HtmlTextWriter writer) +76
   System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +20
   Telerik.Web.UI.RadWebControl.RenderBeginTag(HtmlTextWriter writer) +36
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +20
   Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +92
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
   Telerik.Web.UI.RadCompositeDataBoundControl.RenderContents(HtmlTextWriter writer) +115
   Telerik.Web.UI.RadPivotGrid.RenderContents(HtmlTextWriter writer) +94
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   Telerik.Web.UI.RadCompositeDataBoundControl.Render(HtmlTextWriter writer) +92
   Telerik.Web.UI.RadPivotGrid.Render(HtmlTextWriter writer) +275
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxPanel.RenderChildren(HtmlTextWriter writer) +218
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
   Telerik.Web.UI.RadAjaxPanel.RenderContents(HtmlTextWriter writer) +45
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   Telerik.Web.UI.RadAjaxPanel.Render(HtmlTextWriter writer) +80
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer) +161
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +248
   System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +37
   Telerik.Web.UI.OurUpdatePanel.Render(HtmlTextWriter writer) +464
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +208
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +216
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +17
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +106
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +1222
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +17
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +106
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386



I Investigated and found that issue is because when generating span id RadPivotGrid uses column name as part of control name
and it does not consider the arabic character for the id attribute.

If arabic character can not be used then PivotGrid should append a counter with the id so that it does not generate the duplicate id.

Following is the HTML generated with one arabic column and one english column

<td class="rpgFilterZone" colspan="2">
<
span id="RadPivotGrid1_ctl00_ctl00_SpanPanelFieldsPopup" class="rpgFieldsPopup">
<
span class="rpgFieldsPopupWrapper">
<
span id="RadPivotGrid1_ctl00_ctl00_rc_" class="rpgFieldItem">شهر</span>
<
span id="RadPivotGrid1_ctl00_ctl00_rc_Year" class="rpgFieldItem">Year</span>
</
span><span class="rpgGroupedFieldsTitle">All Fields</span></span>
</
td>

1 Answer, 1 is accepted

Sort by
0
Deyan Enchev
Telerik team
answered on 05 Nov 2013, 01:05 PM
Hi Asad,

We are aware of this issue when using Arabic characters for UniqueName. Currently our development department is working on a fix for this.

Until this gets fixed you can use Arabic characters for the column Caption and Latin for UniqueName. This way you should not see the error because SPAN IDs are generated from the values set to UniqueName.

Regards,
Deyan Enchev
Telerik
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 the blog feed now.
Tags
PivotGrid
Asked by
asad
Top achievements
Rank 1
Answers by
Deyan Enchev
Telerik team
Share this question
or