EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 18, 2012, 10:24:55 PM



Title: event after get but before load
Post by: devnull on March 18, 2012, 10:24:55 PM
Hi;

With controls like the tree which has it's own axaj load function via supplied url etc, is it possible to have an event which fires after the data has been retrieved but before the data is loaded into the control elements ???

I would like to do some processing of the data after retrieval but before it's actually loaded to the control's data elements.

Thanks



Title: Re: event after get but before load
Post by: stworthy on March 19, 2012, 07:19:41 PM
Maybe the 'loadFilter' option is what you want. This feature will be integrated into next version, download the plugin from http://www.jeasyui.com/easyui/plugins/jquery.tree.js
The usage is same as the datagrid:

Code:
$('#tt').tree({
loadFilter:function(data,parent){
  if (data.d){
    return data.d;
  } else {
    return data;
  }
}
});