SearchOptions Class
Contains options affecting search in a document.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v25.2.Core.dll
Declaration
Remarks
Use the IWorkbook.Search, Worksheet.Search or CellRange.Search method with a SearchOptions instance passed as a parameter to perform a search with the required settings.
The following code snippet searches for cells that contain today’s date. The matching cells are highlighted in green:
using DevExpress.Spreadsheet;
// ...
// Specify the search term.
string searchString = DateTime.Today.ToString("d");
// Specify search options.
SearchOptions options = new SearchOptions();
options.SearchBy = SearchBy.Columns;
options.SearchIn = SearchIn.Values;
options.MatchEntireCellContents = true;
// Find and highlight all cells that contain today's date.
IEnumerable<Cell> searchResult = worksheet.Search(searchString, options);
foreach (Cell cell in searchResult)
cell.Fill.BackgroundColor = Color.LightGreen;
Inheritance
Object
SearchOptions
See Also