Closing task window manually

6 posts, 1 answers
  1. Sam
    Sam avatar
    60 posts
    Member since:
    Mar 2011

    Posted 13 Jul Link to this post

    I'm sure there has to be an easy solution for this. My requirement is that I need to manually close the Task window when you click on a task within Javascript. The window doesn't appear in the list of controls using $telerik.radControls library. If anyone knows how to do this, it would be much appreciated. 
  2. Sam
    Sam avatar
    60 posts
    Member since:
    Mar 2011

    Posted 13 Jul in reply to Sam Link to this post

    By the way, I can hide the element but because it is modal, it still disables everything so I need to get the object of the window and call the close method on the object unless there is a global way to close the active window. Tried using window manager and closeAll but that doesn't work either. 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sam
    Sam avatar
    60 posts
    Member since:
    Mar 2011

    Posted 14 Jul in reply to Sam Link to this post

    I ended up removing each element from the dom like below

                        $telerik.$(".k-widget.k-window.radSkin_Silk").remove();
                        $telerik.$(".k-overlay").remove();
    The problem I'm thinking is that the actual objects might not be removed from memory or the telerik's control collection. Also, this seems to run the risk of removing the wrong element. If anyone has a better option, please let me know. 

     

  5. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 15 Jul Link to this post

    Hi,

    You can use the following internal API to close the task edit window:
    $find("RadGantt1")._widget._editor.close()


    Regards,
    Bozhidar
    Telerik by Progress
  6. Sam
    Sam avatar
    60 posts
    Member since:
    Mar 2011

    Posted 15 Jul in reply to Bozhidar Link to this post

    Once again, thanks Bozhidar. Alternatively, can you manually open a task window?
  7. Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 19 Jul Link to this post

    Hello,

    You can call _widget.editTask(uid), where uid is the unique id of the task you want to edit.

    Regards,
    Bozhidar
    Telerik by Progress
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017