0

please I'm stock in this error and i can't get rid of it i have a user control inside another user control the child control contain RadAjaxPanel.

the parent control contain a Radgrid wish have an editformTemplate and the child control is loaded inside it i'll show u in code :

<EditFormSettings EditFormType="Template">
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
                <FormStyle BackColor="#FCFCFC"></FormStyle>
                <FormTemplate>
                       <table>
                            <tr>
                                <td class="LblWidth" style="padding-top: 5px;">
                             <asp:Label ID="Label1" runat="server" Text="Center logo:">
                                    </asp:Label>
                                </td>
                                <td style="padding-top: 10px;">

                 <uc1:MAYAUploadImageControl ID="UploadImageControl1" runat="server" />


                                    <span class="redSpan">
                                    </span>
                                </td>
                            </tr>
                        </table>
   </FormTemplate>
            </EditFormSettings>

that is the parent control

the child control is :

<telerik:RadAjaxPanel ID="ajaxPanel" runat="server" >
    <asp:HiddenField ID="hf_FileName" runat="server" />
    <asp:HiddenField ID="ImageChanged" runat="server" Value="0" />
    <asp:Label ID="Label1" runat="server" Text="New Picture:"></asp:Label>
    <br />
    <telerik:RadImageEditor ID="RIEditor" runat="server" Width="180" Height="150" ToolBarMode="Default"
        EnableResize="false" EnableTheming="false" BackColor="Transparent" OnImageSaving="ImageEditor_ImageSaving"
        StatusBarMode="Hidden" CanvasMode="No" ToolBarPosition="top" BorderStyle="Solid"
        BorderWidth="0px" Visible="false" OnClientImageLoad="ImageLoad" OnClientImageChanged="ImageChanged">
        <Tools>
            <telerik:ImageEditorToolGroup>
                <telerik:ImageEditorTool CommandName="Flip" />
                <telerik:ImageEditorTool CommandName="FlipVertical" />
                <telerik:ImageEditorTool CommandName="FlipHorizontal" />
                <telerik:ImageEditorToolSeparator />
                <telerik:ImageEditorTool CommandName="Crop" />
                <telerik:ImageEditorTool CommandName="Resize" />
                <telerik:ImageEditorToolSeparator />
                <telerik:ImageEditorTool CommandName="Reset" />
            </telerik:ImageEditorToolGroup>
        </Tools>
    </telerik:RadImageEditor>
    </telerik:RadAjaxPanel>

parent control ascx.cs:

 protected void GridCenters_ItemCommand(object sender,Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.UpdateCommandName || e.CommandName == RadGrid.PerformInsertCommandName)
    { controls_CustomControls_UploadImageControl_Maya ctrl = e.Item.FindControl("UploadImageControl1") as controls_CustomControls_UploadImageControl_Maya;
        if (ctrl.ImageFileName != "")
        {
            //string imageFileName = (e.Item.FindControl("AsyncUpload1") as RadAsyncUpload).UploadedFiles[0].FileName;
            ctrl.SaveImage();
            logo = ctrl.ImageFileName != "" ? ConvertImgToBinary(ctrl.ImageFileName) : null;
        }

        switch (e.CommandName)
        {
 case "Update":
    if(!EntertainmentDataAccess.UpdateCenter(long.Parse(e.CommandArgument.ToString()), centerName, centerType, logo, website, "", isactive, "", mail, tel, Mobile, fax, country, casa, town, street, BuildNb, POB))
                {
                    LblError.Text = "Branch cannot be updated";
                }
                else
                {
                    LblError.Text = "Branch updated successfully";
                    GridEditCommandColumn editColumn = (GridEditCommandColumn)GridCenters.MasterTableView.GetColumn("EDIT");
                    editColumn.Visible = true;

                    GridCenters.DataBind(); // here i'm getting the error
                }
                break;
        }
    }

I'm sorry for my messy explanation but i'm stuck for days in this problem and i cldn't resolve it

  • Can you post the full error message? Also, won't you need a `ScriptManager` in the parent form? – nick_w Jan 12 '13 at 08:08
  • my script manager is in the master page and the full error is : Cannot unregister UpdatePanel with ID 'AjaxPanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported. Parameter name: updatePanel – Bassem Assem Alameddine Jan 12 '13 at 08:15