cntr field glitches after filtering grid


my gird has cntr field and filters attached to header. If some filtering done the cntr field contains some trash numbers. If i sort grid by any field then order becames normal.
You can see demo here

Is it possible to fix it?

Thank you.

Try to add following lines to the grid initialization:

mygrid.attachEvent("onFilterEnd",function(){ mygrid.resetCounter(0) })

Thank you Olga,

counter works correctly after fix.