Datatable reload onClick

Hi All,
when a user click on a specific datatable cell I need to send a POST and reload the entire datatable content:

onClick:{
	"fa-trash-o" : function(ev, id){
		 webix.ajax().post("file.php", {parameter: id.row}, {
			error:function(text, data, XmlHttpRequest){webix.message({text,type:"error"});},
			success:function(text, data, XmlHttpRequest){
				$$('mydatatable').clearAll();
			}
		});
	}
}

The above code return an error, after executing the POST:
Uncaught TypeError: $$(…).clearAll is not a function

What’s going wrong?

Thanks!
Perez

Hello,

There is no any obvious error in the above code, so can you please correct the following implementation or provide a bit more precise code snippet where the problem will appear?

Please, check the quick test without any specific conditions:
https://webix.com/snippet/afb96c41

Thanks Listopad,
after a deep analysis (based on your working sample) I found a mess on components Ids between app files.

Thankyou for your time,
Really appreciated
Perez