I’ve got a window that is dynamically created and destroyed based on user input, but when I create it for the second time in a session (the first copy has been destroyed already) the datatable won’t populate with data, thought I can create alerts showing the data is being returned. Has anybody seen this before? Any ideas as to what may be happening? I load the datatable with a function like this one:
function getData(parent_record_nbr) {
var neededData;
webix.ajax().sync().get("BOEncounters_get_notes.php",{enc_record_id:enc_record_nbr}, function(text,data,ajax){neededData = text;});
$$("myDatatable").clearAll();
$$("myDatatable").parse(neededData);
}
I was using $$(“windowContainingDatatable”).destructor() to destroy the window. I’ll try to look at the js console to check that things are pointing correctly. Thanks for all the help you’ve already given.
Forgive me, but I haven’t much experience yet with the js console in Chrome. When I ran $$(“myDatatable”).$view the view_id was “myDatatable”. What other data should I be looking at to troubleshoot this?
By any chance do you have a scrollview in the window ? There is a known issue with incorrect destruction content of scrollview. It will be fixed in oncoming Webix 2.3
Sorry my response is a little late, I’ve been out of town for a few days. To answer your question, I’m using the current version from the CDN (https://cdn.webix.com/edge/webix.js). I got notification that Webix 2.3 is out tried my webapp again and still have the same issue. I’ll be working more on it today.
I forgot to answer your second question. I’m currently not using a Scrollview. Current components are form, toolbar, button, datatable, window, text, and label.
So I’ve been doing some more troubleshooting, and I’m now thinking that I’ve attached my onItemDblClick event that creates the window incorrectly to the datatable on the parent view. I’m currently doing it as listed below, but have tried just using hide/show for the child window to rule out issues with the destructor.
My problem still exists, but I’ve worked around it by creating the window with hidden:true outside of the onItemDblClick event and using show/hide to keep the user from interacting with the window when they think it’s been destroyed. I’ll still check this thread every once in a while, but for now this workaround should get me what I need.