[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1177
  • Last Modified:

telerik radwindow issue

Im trying to open a window through serverside code but it wont open....what am i missing?

  If bladeDiscount > 0 Then
                      Dim window6 As New RadWindow()
            window6.NavigateUrl = "http://www.google.com"
            window6.VisibleOnPageLoad = True
            window6.Width = 500
            window6.Height = 300
            Me.Controls.Add(window6)

        Else
            If Session("bladeDiscount") = "YES" Then
                order.ResetDiscounts(strSite)
                Session("bladeDiscount") = ""

                Dim message2 As String = "Sorry, the quantity of your blade order no longer qualifies for a discount."
                ClientScript.RegisterStartupScript(Me.GetType, "jsMessage", "alert('" & message2 & "');", True)
            End If
        End If

0
Wigging
Asked:
Wigging
  • 4
  • 2
1 Solution
 
edemcsCommented:
Is this done within an UpdatePanel?  If so, make sure that the UpdatePanel is refreshing after the callback
0
 
WiggingAuthor Commented:
no i dont have updatepanel?   do i have to add one?
0
 
edemcsCommented:
No, you don't need to.  You have to add the window you create to the RadWindowsManager.Windows collection.  Do you have that on your page?
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
WiggingAuthor Commented:
yes, I have this...what else am i missing?
                                <telerik:RadWindowManager ID="RadWindowManager1"
                                                ShowContentDuringLoad="False"
                                                AutoSize="True"  
                                                VisibleStatusbar="False"
                                                ReloadOnShow="True"  
                                                runat="server"
                                                Opacity="99"  
                                                BehaviorsAutoSize="true"
                                                Skin="Sunset"
                                                EnableShadow="True" >
                                                <Windows>
                                                    <telerik:RadWindow ID="RadWindow2" runat="server" Behaviors="Close" OnClientClose="OnClientClose"
                                                        NavigateUrl="DialogCS2.aspx">
                                                    </telerik:RadWindow>
                                           
                                                    <telerik:RadWindow ID="RadWindow6" runat="server" AutoSize="True"
                                                        EnableShadow="True" NavigateUrl="dialogalternateitem.aspx" Opacity="99"
                                                        ReloadOnShow="True" ShowContentDuringLoad="False" Skin="Sunset"
                                                        style="display:none;" VisibleStatusbar="False">
                                                    </telerik:RadWindow>
                                           
                                                </Windows>
                                            </telerik:RadWindowManager>
0
 
edemcsCommented:
If you have it on the ASPX side, it would be redudent to add it in the code-behind.  Your style for the window is display:none which will hide it.  Remove that style and set the visibility of the window in the code-behind.  Let me get you an example.
0
 
edemcsCommented:
Set the window to VisibleOnPageLoad = false.  When you want to use it on the postback, set that window to VisibleOnPageLoad = true.  Something like this:

  If bladeDiscount > 0 Then
        RadWindow6.VisibleOnPageLoad = true

        Else
            If Session("bladeDiscount") = "YES" Then
                order.ResetDiscounts(strSite)
                Session("bladeDiscount") = ""

                Dim message2 As String = "Sorry, the quantity of your blade order no longer qualifies for a discount."
                ClientScript.RegisterStartupScript(Me.GetType, "jsMessage", "alert('" & message2 & "');", True)
            End If
        End If
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now