EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: doev on December 19, 2013, 02:56:44 AM



Title: Can I hook into filterrows update event?
Post by: doev on December 19, 2013, 02:56:44 AM
I am using the filterrow extension with remote filters. I need some additional filter field in the toolbar. When the filterrow triggers an update, I need to send the additional filter values. How do this?

What I try first, is to use the "filterStringify" function to inject custom data but maybe there is some better way?


Title: Re: Can I hook into filterrows update event?
Post by: stworthy on December 20, 2013, 06:12:00 AM
The 'onBeforeLoad' event will be triggered before doing a remote filter. Try using this event to add your additonal parameter values.
Code:
$('#dg').datagrid({
  onBeforeLoad:function(param){
    param.p1 = 'v1';
    param.p2 = 'v2';
  }
});