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

Codebehind and not Clientside Javascript

1 Answer 109 Views
Window
This is a migrated thread and some comments may be shown as answers.
bigrich legend
Top achievements
Rank 1
bigrich legend asked on 29 Nov 2009, 04:54 PM
Is there a way to get the same functionality using code behind instead of clientside javascript.
For example the following code used in online demo .../liveDemos/Windows/Examples/RestrictionZone/Defaultcs.aspx
goes as follows:

function OnClientNodeClickingTreeview(sender, eventArgs)
{
var oManager = GetRadWindowManager();
//get the clicked node
var Url = eventArgs.get_node(sender, eventArgs).get_value();
//get the active RadWindow
var oWnd = GetRadWindowManager().getActiveWindow();
//now we need to open a new RadWindow and ensure that
//such RadWindow has not been already opened.
var windows = oManager.get_windows();
for (var i=0;i<windows.length;i++)
{
var wnd = windows[i];
//check if an already created window has that Url
if (wnd.get_navigateUrl() == Url)
{
//if so - activate that window
wnd.setActive(true);
return;
}
}
//else open a new window
radopen(Url,null);
}
I have been trying not to use javascript but instead to implement the above in codebehind. Where can I get info to assist me in the above endeavour?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Dec 2009, 12:50 PM
Hello bigrich,

If you want to open RadWindow from server-side code, you could do that by setting its VisibleOnPageLoad property to true. When working with RadTreeview, you could use RadTreeview's NodeClick server-side event for this purpose.


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
bigrich legend
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or