Recommended Way to Close Window That Generated Event within that Event

I have a popup window which contains a datatable. I want to catch an “ItemDblClick” event generated and within the handling of that Event i wish to close the Popup window which is the parent of the datatable (thereby destroying both the popup and datatable)

what is the recommended approach to accomplish this task.

Thanks
Frank

Please, check the snippet: http://webix.com/snippet/a4b81238