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

Opwn RAD Window with RAD PageView?

1 Answer 82 Views
Window
This is a migrated thread and some comments may be shown as answers.
Craig Mellon
Top achievements
Rank 1
Craig Mellon asked on 22 Jul 2011, 04:33 PM
I dropped an asp button within a RAD PageView control, on button click in code behind I call javascript to open the RAD Window...like this:

 
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim strScript As String = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowWindow);</script>"
  Page.ClientScript.RegisterStartupScript(Me.GetType, "ShowWindow", strScript)
End Sub

function ShowWindow() {
  var manager = GetRadWindowManager();
  var window1 = manager.GetWindowByName("SaveSiteNoteWindow");
  window1.show(null, "SaveSiteNoteWindow");
}

I use this method in other scenerios and it works perfect, as soon as I drop the button within the RAD PageView control nothing happens upon button click.

Please advise.

Thanks,













1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 25 Jul 2011, 02:09 PM
Hello Craig,

  Your code seems correct and is working fine on my end - I am attaching the page I used to test with as a reference and you can find a video I recorded here: http://screencast.com/t/WLIdolzgV.

On a side note - please make sure that you do not already have an update panel in the multipage, as the ClientScript's RegisterStartupScript may not always work in an ajaxified scenario. For this purpose I recommend the static ScriptManager's RegisterStartupScript method, as shown in this help article: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-javascript-from-server-side.html.

Please also note that the RadWindow's show() method does not take any arguments, as in my page.

Please also refer to your other thread, related to this matter: Ticket ID: 432721, 'Error: Unable to get value of the property 'GetWindowByName': object is null or undefined' for more tips on the possible origin of such an issue.

  If you are still unable to resolve this please modify my page accordingly or post a list with the steps needed to reproduce it with my page so that we can give you a more relevant answer.




Kind regards,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Craig Mellon
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or