Calling an update panel from another

2 posts, 0 answers
  1. Debashis Pyne
    Debashis Pyne avatar
    66 posts
    Member since:
    Apr 2010

    Posted 09 Aug 2010 Link to this post

    Hi,

    I have 2 panels in an aspx page.
    Panel1 - has 1 radiobuttonlist with Yes and No as options
    Panel 2 - has 2 textboxes.

    I want when Yes from radiobuttonlist is selected - the panel 2 to be displayed and the same to be hdden with No is selected.

    The following the code i am using in aspx page:

    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server">
        <AjaxSettings>     
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="pnlRadioButtons">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="pnlRadioButtons" />
            </UpdatedControls>
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="pnlMiddleData">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="pnlMiddleData" />
            </UpdatedControls>
          </telerik:AjaxSetting>
        </AjaxSettings>
      </telerik:RadAjaxManager>


    The following is the C# code:

    protected void RadBtnSystemUser_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (RadBtnSystemUser.SelectedValue.ToString() == "1")
            {
                pnlMiddleData.Visible = true;
                reqFldUserId.Enabled = true;
            }
            else
            {
                pnlMiddleData.Visible = false;
                reqFldUserId.Enabled = false;
            }
        }

    This throws an error saying that since are in 2 seperate update panels an error occured.

    Is this possible?
    Please help.

    --
    Regards,
    Debashis
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 10 Aug 2010 Link to this post

    Hello,

    Could you please elaborate a bit more in your scenario? Are the controls pnlMiddleData and pnlRadioButtons RadAjaxPanela or asp UpdatePanela. Please note that you could not add RadAjaxPanels or asp UpdatePanels into the RadAjaxManager settings.

    Kind regards,
    Maria Ilieva
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top