how to put new data into datatable while removing the old data

Ok,

I have this datatable which was populated by getting data from an user specified file. Pretty much the user inputs a file name and clicks a button. The program then does its magic by parsing various files and then at the end it displays the data in a datatable. So far so good. Here is the problem. Now the user wants to parse a different file. Well when the user puts in the new file name it a new table is created below the original table. I want the data from the first table to go away and then put the new data in it. The format is the same just the data changes. Here is partial code with only one entry. (http://webix.com/snippet/737b4202) Just imagine like 10 more rows. Now the user clicks the button. I want the data in the table to change. The data is stored in the same object.

also, the number of rows may change. It can have fewer or more colums than the previous entry. The number of columns do stay the same

You can use something like

           $$("dt").clearAll();
           $$("dt").parse(rossObj.machines)

First command clear the existing data, second loads the new one

http://webix.com/snippet/1aae4b46

Yes, this is the answer i was looking for. It also solves a whole set of synchronizing problems. I had to reorganized the code but, it is now more legible and works as intended. Also the layout makes more sense as well.