Codebehind and not Clientside Javascript

2 posts, 0 answers
  1. bigrich legend
    bigrich legend avatar
    12 posts
    Member since:
    Sep 2009

    Posted 29 Nov 2009 Link to this post

    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?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Dec 2009 Link to this post

    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.
Back to Top