nl_tokens: Finds all strings that matches the searched value in each grid cells .
pl_tokens: function ( ) { var me = this , count = 0 ; me . view . refresh ( ) ; // reset the statusbar me . statusBar . setStatus ( { text : me . defaultStatusText , iconCls : '' } ) ; me . searchValue = me . getSearchValue ( ) ; me . indexes = [ ] ; me . currentIndex = null ; if ( me . searchValue !== null ) { me . searchRegExp = new RegExp ( me . searchValue , 'g' + ( me . caseSensitive ? '' : 'i' ) ) ; me . store . each ( function ( record , idx ) { var td = Ext . fly ( me . view . getNode ( idx ) ) . down ( 'td' ) , cell , matches , cellHTML ; while ( td ) { cell = td . down ( '.x-grid-cell-inner' ) ; matches = cell . dom . innerHTML . match ( me . tagsRe ) ; cellHTML = cell . dom . innerHTML . replace ( me . tagsRe , me . tagsProtect ) ; // populate indexes array, set currentIndex, and replace wrap matched string in a span cellHTML = cellHTML . replace ( me . searchRegExp , function ( m ) { count += 1 ; if ( Ext . Array . indexOf ( me . indexes , idx ) === - 1 ) { me . indexes . push ( idx ) ; } if ( me . currentIndex === null ) { me . currentIndex = idx ; } return '<span class="' + me . matchCls + '">' + m + '</span>' ; } ) ; // restore protected tags Ext . each ( matches , function ( match ) { cellHTML = cellHTML . replace ( me . tagsProtect , match ) ; } ) ; // update cell html cell . dom . innerHTML = cellHTML ; td = td . next ( ) ; } } , me ) ; // results found if ( me . currentIndex !== null ) { me . getSelectionModel ( ) . <mask> ( me . currentIndex ) ; me . statusBar . setStatus ( { text : count + ' matche(s) found.' , iconCls : 'x-status-valid' } ) ; } } // no results found if ( me . currentIndex === null ) { me . getSelectionModel ( ) . deselectAll ( ) ; } // force textfield focus me . textField . focus ( ) ; }