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

Two components with the same id

0 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Perfect
Top achievements
Rank 1
Perfect asked on 18 Jun 2012, 04:53 PM
Hi Team,

  I'm getting below javascript error. I'm using Q22010 version.

  Accroding to my requirement with help of  "Load on Demand" demo implemented.

  In aspx page I write below  code
  <telerik:RadAjaxManager runat="server" ID="ramMasterData">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

and in my user control page also below code I write:
 <telerik:RadAjaxManager ID="ramRes" runat="server" EnableAJAX="true" OnAjaxRequest="ramRes_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ramRes">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rgGroup">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
   and in ascx.cs file

protected void ramRes_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        try
        {
            if (e.Argument.StartsWith("Rebind$"))
            {
                //get groupId& Row Position from e.Argument
                string[] arrVal = e.Argument.Split('$');
                var groupId = arrVal[1].Trim();
                var rowpos = arrVal[2].Trim();

                rgGroup.MasterTableView.HierarchyDefaultExpanded = false;

                //refresh the Approvers list
                rgGroup.Rebind();

                //Call the javascript function to expand the parent node.
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadscript1", "ExpandMasterTableViewItem(" + rowpos + ");", true);
            }
            else if (e.Argument.StartsWith("Rebind"))
            {
                rgGroup.Rebind();
            }
        }
runtime I getting below error.

 Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_ContentPlaceHolder1_rgGroup_userControl_ramRes' can't be added to the application.
Thanks in Advance.
Mr.Perfect

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Perfect
Top achievements
Rank 1
Share this question
or