Controls inside Radwindow not hiding

2 posts, 0 answers
  1. Vitaly
    Vitaly  avatar
    86 posts
    Member since:
    Aug 2011

    Posted 22 May 2017 Link to this post

    Good afternoon,

    I have Radwindow in my HTML :

    <telerik:RadWindow ID="RadWindow1" runat="server" Modal="true" Animation="Fade" AutoSizeBehaviors="Default" Width="550px" Height="250px"
    VisibleStatusbar="false" VisibleTitlebar="true" AutoSize="false" Behaviors="None" Skin="Outlook" Title="SCHEDULE ERROR(S)" >
    <ContentTemplate>

    <p style="width: 90%; height: 15px; font-size:medium; font-weight:bold;color:Red;" >
    The following should be corrected in Galaxy:
    </p>
    <asp:Panel ID="prepsPanel" runat="server">
    <div id="prepsDays" runat="server" style="width: 90%; height: 15px; font-size:small; font-weight:bold;color:Navy; padding-bottom:5px; text-align:left;" >
    <asp:BulletedList ID="BulletedList8" runat="server" BulletStyle="Disc">
    <asp:ListItem>Schedule does not correspond to num of preps(days)</asp:ListItem>
    </asp:BulletedList>
    </div>
    </asp:Panel>
    <asp:Panel ID="sdatePanel" runat="server">
    <div id="stDate" runat="server" style="width: 90%; height: 15px; font-size:small; font-weight:bold;color:Navy; padding-bottom:5px; text-align:left;" >
    <asp:BulletedList ID="BulletedList9" runat="server" BulletStyle="Disc">
    <asp:ListItem>Start Date must be valid work day</asp:ListItem>
    </asp:BulletedList>
    </div>
    </asp:Panel>


    </ContentTemplate>
    </telerik:RadWindow>

    Based on criteria in code behind I want to make it invisible like this:

    if (schcnt > 0 || stdcnt > 0 || endcnt > 0 || trmcnt > 0 || jobcnt > 0 || dupcnt > 0 || loccnt > 0 || fundcnt > 0)
    {

    string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "key", script, true);


    if (schcnt == 0)
    prepsPanel.Visible = false;

    if (stdcnt == 0)
    sdatePanel.Visible = false;

    But apparently it is not working. Both error showing in popup screen. Should be only one error on the popup screen.

    Please help me to resolve this issue.

    Thanks.

    Vitaly.

                               

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5323 posts

    Posted 23 May 2017 Link to this post

    Hi Vitaly,

    Make sure to include the contents of the RadWindow in the postback: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/how-to-use-radwindow-with-ajax.

    Regards,

    Marin Bratanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top