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

Hidden controls

1 Answer 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
fer
Top achievements
Rank 1
fer asked on 05 Apr 2014, 09:28 PM
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
 



1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Apr 2014, 02:56 AM
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.
Tags
Ajax
Asked by
fer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or