As I can see from the code in the snapshot the Window widget is initialized over a div element with no ID.
But, later, in order to get the widget reference the #window id is used, but such an element does not exists in the DOM. This is why undefined is returned—there is no DOM element with id window in the first place.
This article here might help you understand the relation between the widget reference and the DOM element: http://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods#getting-widget-references.
If you have any further difficulties on the case here, please try to isolate them in a dojo (http://dojo.telerik.com/) so that I can properly examine the code and debug it properly. Snapshots of code and results are difficult to be used for debugging and examination.
Telerik by Progress