Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding afterRedraw event in grid.filter and searchFilter respectively

  • Loading branch information...
commit 79cc5e09821e4f2dc89144f8ef14a4776170fccc 1 parent 1f146b3
@tonytomov authored
Showing with 7 additions and 1 deletion.
  1. +5 −1 js/grid.filter.js
  2. +2 −0  js/grid.formedit.js
View
6 js/grid.filter.js
@@ -44,6 +44,7 @@ $.fn.jqFilter = function( arg ) {
filter: null,
columns: [],
onChange : null,
+ afterRedraw : null,
checkValues : null,
error: false,
errmsg : "",
@@ -166,13 +167,16 @@ $.fn.jqFilter = function( arg ) {
return $.isFunction(this.p.onChange) ? this.p.onChange.call( this, this.p ) : false;
};
/*
- * Redrow the filter every time when new field is added/deleted
+ * Redraw the filter every time when new field is added/deleted
* and field is changed
*/
this.reDraw = function() {
$("table.group:first",this).remove();
var t = this.createTableForGroup(p.filter, null);
$(this).append(t);
+ if($.isFunction(this.p.afterRedraw) ) {
+ this.p.afterRedraw.call(this, this.p);
+ }
};
/*
* Creates a grouping data for the filter
View
2  js/grid.formedit.js
@@ -21,6 +21,7 @@ $.jgrid.extend({
beforeShowSearch: null,
afterShowSearch : null,
onInitializeSearch: null,
+ afterRedraw : null,
closeAfterSearch : false,
closeAfterReset: false,
closeOnEscape : false,
@@ -148,6 +149,7 @@ $.jgrid.extend({
sopt: p.sopt,
groupButton : p.multipleGroup,
ruleButtons : p.multipleSearch,
+ afterRedraw : p.afterRedraw,
_gridsopt : $.jgrid.search.odata,
onChange : function( sp ) {
if(this.p.showQuery) {
Please sign in to comment.
Something went wrong with that request. Please try again.