ReoGrid ReoGrid Web
find replace search regex lite v1.5

Find & Replace

Excel-style Ctrl+F / Ctrl+H with a built-in find bar: match case, entire cell, regular expressions, and a sheet / selection / workbook scope. Every match is highlighted on the canvas, and replace-all undoes in one step.

How it works

This demo loads a 40-row order list and lets you search it three ways: the built-in find bar (Ctrl/Cmd+F), the built-in replace bar (Ctrl/Cmd+H), and the programmatic API driven from the toolbar buttons. Available in both editions since v1.5.0.

  • Press Ctrl/Cmd+F โ€” the find bar offers match-case, entire-cell, regex, and a Sheet / Selection / Workbook scope; every hit is highlighted and Enter / Shift+Enter step through them
  • โ€œHighlight โ€˜Tokyoโ€™โ€ calls grid.find('Tokyo') โ€” starting a search session highlights every match on the canvas
  • โ€œReplace Allโ€ calls grid.replaceAll('Tokyo', 'Osaka', { wholeCell: true }) and reports the count โ€” one undoable step, and protected cells are never rewritten
  • โ€œRegexโ€ searches order ids with ^INV-10[0-4]\d$ โ€” patterns are JavaScript regular expressions
  • Each button ends with grid.focus() (also new in v1.5.0), so Ctrl/Cmd+Z after a click reaches the grid instead of the browser

Key APIs used

grid.showFindBar('find' | 'replace')

Open the built-in bar programmatically โ€” the same UI as Ctrl/Cmd+F and Ctrl/Cmd+H

grid.find(query, options)

Start a search session: selects and scrolls to the first match and highlights every hit on the canvas

grid.findAll(query, options)

Collect every match as an array without starting a session โ€” a pure read

grid.replaceAll(query, replacement, options)

Rewrite every matching cell in a single undoable step; returns the number of cells changed

grid.clearFind()

End the session and remove the highlight

grid.focus()

Return keyboard focus to the grid after a toolbar click, so the next shortcut reaches the grid

Source Code

TypeScript

Related Documentation

Related Demos

Stay Updated

Be first to know โ€” get updates as they ship

Get notified of new releases, features, and announcements.
No spam โ€” just updates that matter.