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

Controls inside Radwindow not hiding

1 Answer 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaly
Top achievements
Rank 1
Iron
Iron
Vitaly asked on 22 May 2017, 05:19 PM

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.

                           

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 May 2017, 11:55 AM

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.
Tags
General Discussions
Asked by
Vitaly
Top achievements
Rank 1
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or