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

Issues with Multiple RadAjaxPanel

1 Answer 143 Views
AjaxPanel
This is a migrated thread and some comments may be shown as answers.
Kaushal
Top achievements
Rank 1
Kaushal asked on 16 Aug 2016, 11:51 AM

I am writing this simple page with two RadAjaxPanel as:

 

<html lang="en">
<body>
    <form runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel runat="server" ID="rdProgressPanel"></telerik:RadAjaxLoadingPanel>

        <telerik:RadAjaxPanel ID="upd1" runat="server" LoadingPanelID="rdProgressPanel">
            <asp:Panel runat="server" ID="panel1">
                step 1
            <asp:Button Text="text" runat="server" OnClick="Unnamed_Click" />
            </asp:Panel>
        </telerik:RadAjaxPanel>

        <telerik:RadAjaxPanel ID="upd2" runat="server" LoadingPanelID="rdProgressPanel">
            <asp:Panel runat="server" ID="panel2">
                step 2            
            <asp:Button Text="text" runat="server" OnClick="Unnamed_Click1" />
            </asp:Panel>
        </telerik:RadAjaxPanel>
    </form>
</body>
</html>

 

On the server side, I have written to simply visible the panels as:

        protected void Unnamed_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            panel2.Visible = true;
        }

        protected void Unnamed_Click1(object sender, EventArgs e)
        {
            panel1.Visible = true;
            panel2.Visible = false;
        }

 

Issue is, when I click first button that makes panel 2 visible and panel 1 invisible. But, when I click second button panel 2 is getting invisible but panel1 is not getting visible again.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 17 Aug 2016, 11:27 AM
Hi Kaushal,

Please examine the following article that describes how you can Ajax-enable invisible controls. Try to use similar approach and you should be able to implement the behavior you are looking for.



Regards,
Viktor Tachev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
AjaxPanel
Asked by
Kaushal
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or