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.