SearchOptions Class
Contains options affecting search in a document.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v26.1.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.
Example
How to: Search for Specific Data in a Document
workbook.Calculate();
Worksheet worksheet = workbook.Worksheets["ExpenseReport"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// 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 all cells containing today's date and paint them light-green.
IEnumerable<Cell> searchResult = worksheet.Search(searchString, options);
foreach (Cell cell in searchResult)
cell.Fill.BackgroundColor = Color.LightGreen;
Inheritance
Object
SearchOptions
See Also