After reload datatable this.validate() not work

Hi,

I have a datatable , this datatable is loaded in ready() method of view, after selected richselect reload datatable with the param selected in richselect in attachEvent of richselect.

When load first time the view this.validate() work correctly, but when reload data not work.

“pseudocode”
//READY METHOD OF VIEW"

ready(){
  //Load data when change value of richselect
  $$("myrichselectlang").attachEvent("onChange", (newv, oldv) => {
         $$("mydatatable").clearAll();
         $$("mydatatable").load("api/getdata?data=" + newv);
  }
   //Load fist time when open view 
    $$(LanguagesIDS.idTabla).load("api/getdata?lang=" + $$("myrichselect").getValue());
}
//Data load correctly, but "this.validate()" in datatable not work when onChange.
//"DATATABLE"
{ 
  view: "datatable", 
  id: "mydatatable",
  ready: function () {
     this.validate();
   }
  rules:
  {
         key: notEmpty,
         value: notEmpty
  }
}

Thanks in advance.

Hello,
The point is that ready is being implemented only one time on init of the datatable
So if you want to reload and validate the data, you can use onAfterLoad event or load with a callback (also it’s possible via promise)

$(LanguagesIDS.idTabla).load("data_url").then(function(){ ... })

thanks so much!!