demo D302
Find, without losing the neighbours
Ctrl+F highlights every match where it sits, and takes no row away
grid.find(text)
Press Ctrl+F inside this grid and every cell whose text matches lights up exactly where it sits, with every other row still on screen. It answers the question a filter cannot: where is this value, and what is around it?
Find inside a data grid, without taking the neighbouring rows away
Find is the search that leaves the table intact. Type into it and Lattice Grid paints every matching cell in place, reports “N of M”, and steps through the matches with Enter and Shift+Enter, scrolling each one into view. Not one row is reordered, removed or edited, so the row count above the grid does not move. Reach for it when the surrounding rows are the point: a reconciliation where you need the line before and after the one you are hunting, a shift log where the entry matters less than what happened either side of it, an order book where a price only means something against its neighbours. A quick filter answers “show me only these”; find answers “where is this, and what is next to it”. Both can be active at once, and find re-runs over whatever the filter has left.
Matching runs against the text a cell displays, not the value underneath it. A currency column formatted in pounds matches on £1,240.00 as rendered, a unit column matches the unit it shows, and a lookup column matches the label rather than the code behind it. Matches are computed from the row model rather than the painted DOM, so a match five thousand rows down is counted without being rendered, and stepping to it scrolls it into view. Rows pinned to either edge, and a pinned grand total, are searched and painted like any other row.
How do you search a JavaScript data grid without filtering rows out?
Call grid.find(text), or press Ctrl+F (Cmd+F on a Mac) with focus in the grid to open the built-in bar. Lattice Grid highlights every matching cell where it is and returns a count; find.next() and find.prev() move between matches, and find.close() clears them. Because find is an overlay rather than a filter, the row set is untouched throughout.
What is the difference between find and a quick filter?
A quick filter narrows the grid to the rows that match, so the non-matching rows and any totals over them disappear. Find leaves every row where it is and marks the matches. Use the filter when you want to work with only the matching rows, and find when the value’s position in the data is what you are looking for.