Hidden controls

2 posts, 0 answers
  1. fer
    fer avatar
    10 posts
    Member since:
    Aug 2012

    Posted 05 Apr 2014 Link to this post

    Hi

    i have 5 controls

    two of them hidden on some conditions on page load

        <telerik:RadAjaxManager ID="WAjaxman" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="WAjaxman">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Cont1" />
                        <telerik:AjaxUpdatedControl ControlID="Cont2" />
                        <telerik:AjaxUpdatedControl ControlID="Cont3" />
                    </UpdatedControls>
            </AjaxSettings>
        </telerik:RadAjaxManager>


    on code behind i added

    WAjaxman.AjaxSettings.AddAjaxSetting(WAjaxman, Cont4, null);
    WAjaxman.AjaxSettings.AddAjaxSetting(WAjaxman, Cont5, null);

    but it doesn't effect the manager.
    the cont4 and cont5 aren't updated
     



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Apr 2014 in reply to fer Link to this post

    Hi fer,

    The provided information is not enough to replicate the issue. Please have a look into the sample code snippet which works fine at my end. Please provide your code or try to replicate the issue in the sample code if it doesn't help.

    ASPX:
    <telerik:RadAjaxManager ID="RadAjaxmanger1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cont1" />
                    <telerik:AjaxUpdatedControl ControlID="cont2" />
                    <telerik:AjaxUpdatedControl ControlID="cont3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Label ID="cont1" runat="server" Text="Label1">
    </asp:Label>
    <asp:Label ID="cont2" runat="server" Text="Label2">
    </asp:Label>
    <asp:Label ID="cont3" runat="server" Text="Label3">
    </asp:Label>
    <asp:Label ID="cont4" runat="server" Text="Label4" Visible="false">
    </asp:Label>
    <asp:Label ID="cont5" runat="server" Text="Label5" Visible="false">
    </asp:Label>
    <asp:Button ID="Button1" runat="server" Text="Update Label" OnClick="Button1_Click" />

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxmanger1.AjaxSettings.AddAjaxSetting(Button1, cont4, null);
        RadAjaxmanger1.AjaxSettings.AddAjaxSetting(Button1, cont5, null);
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        cont4.Visible = true;
        cont5.Visible = true;
        cont1.Text = "Updated Label1";
        cont2.Text = "Updated Label2";
        cont3.Text = "Updated Label3";
        cont4.Text = "Updated Label4";
        cont5.Text = "Updated Label5";
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top