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

Open radWindow from code behind

4 Answers 274 Views
Window
This is a migrated thread and some comments may be shown as answers.
Joe Querin
Top achievements
Rank 1
Joe Querin asked on 15 Apr 2011, 07:58 PM
I've tried all of the methods suggested but I cannot get the radWindow to open.

The follwing works, but is not what I want.

<a href="#" onClick="javacript: window.radopen(null, 
'radCartWindow');">Open Window</a>

I have a radUpdatePanel which has a repeater.  The repeater creates a linkbutton with each item which at the end of the click event for the linkbutton I've tried to call various snippets of code that I've found on the forums as well.  Removing the radUpdatePanel solves the problem, except for the fact that my page is now not AJAXed.

I'm using the Q1 2011 release of the RAD Ajax Controls.

Please advise.
--
Joe Q.

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Apr 2011, 08:13 AM
Hello Joe,

Would you please share some more details - what exactly is your markup and do you open the RadWindow from the server (VisibleOnPageLoad=true) or on the client. If you open it on the server, make sure that the RadWindow / RadWindowManager control is ajaxified as well.


Kind regards,
Georgi Tunev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Jet
Top achievements
Rank 2
answered on 21 Apr 2011, 02:09 PM
Hello Joe,
Like Georgi said, would be helpful if you can give more details, In the meantime, i think you may want to read this http://www.telerik.com/community/forums/aspnet-ajax/window/login-popup-windows.aspx

Regards
Jet
0
Cori
Top achievements
Rank 2
answered on 25 Apr 2011, 02:07 PM
Hello Joe,

To get a LinkButton to perform a js function, you need to change the OnClientClick event to something like this:

<asp:LinkButton ID="LinkButton1" runat="server"
   OnClientClick="window.radopen(null,  'radCartWindow'); return false;">
</asp:LinkButton>

I don't know if you've tried it that way, but that's pretty much how it's done.
0
Adam Hubble
Top achievements
Rank 1
answered on 27 Apr 2011, 10:15 AM
Joe,

I think this might be something to do with your JavaScript becoming "unhooked" after an ajax call?

See this article:
http://www.4guysfromrolla.com/articles/090810-1.aspx

You may need to re-register your clientside events after an ajax update.

Generally though, I really do not understand why Telerik do not have server-side callable open() and close() methods for RadWindow.

The whole point of these controls is developer productivity.

Matt
Tags
Window
Asked by
Joe Querin
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Jet
Top achievements
Rank 2
Cori
Top achievements
Rank 2
Adam Hubble
Top achievements
Rank 1
Share this question
or