Reputation: 11
I am trying to highlight the searched text in the filtered results of ng-grid. I have implemented custom external filter for filtering. I tried using the 'JavaScript text higlighting jQuery plugin' from
With this implementation, i am able to highlight the text in the entire div in which ng-grid is placed but it disturbs filtering functionality.
What i am looking is a way to aply filter function directly in the filtered rows so that it will search only the specified column for highlighting not the entire div.
But I'm unable to get it working ... any ideas ?
Thanks
Upvotes: 0
Views: 859
Reputation: 2538
When ng-grid generates the columns, it adds classes like 'col0', 'col1' and so on. You can use this to highlight only on the selected column cells
$('#myGridID .col0').highlight('bla');
Upvotes: 0