Your rows selector selects every
which is within a
The nested grid is within the
of the outer grid. Therefore, it is matched by the selector.
Try changing the selector to select
elements which are immediate children of the
var $rows1 = $('.SearchGridViewData tbody > tr');
There's also no point in using
, since that just selects all children. Using
as your selector will have the same effect.
var text1 = $(this).find('td')...
Rather than writing:
return ! ~text1.indexOf(val1) ;
it would be much clearer to write:
return text1.indexOf(val1) !== -1;