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

Closing task window manually

5 Answers 32 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 13 Jul 2016, 07:03 PM
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. 

5 Answers, 1 is accepted

Sort by
0
Sam
Top achievements
Rank 1
answered on 13 Jul 2016, 07:05 PM
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. 
0
Sam
Top achievements
Rank 1
answered on 14 Jul 2016, 01:44 PM

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. 

 

0
Accepted
Bozhidar
Telerik team
answered on 15 Jul 2016, 07:43 AM
Hi,

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


Regards,
Bozhidar
Telerik by Progress
0
Sam
Top achievements
Rank 1
answered on 15 Jul 2016, 01:19 PM
Once again, thanks Bozhidar. Alternatively, can you manually open a task window?
0
Bozhidar
Telerik team
answered on 19 Jul 2016, 05:56 AM
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
Tags
Gantt
Asked by
Sam
Top achievements
Rank 1
Answers by
Sam
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or