{/* Do not edit this file. It is automatically generated by API Documenter. */}


## SearchCellOptions

Flexible configuration model for cell search

**Signature:**

```typescript
export interface SearchCellOptions
```

## Remarks

Used in [GridBase.searchCell()](/refs/Class/GridBase#searchcell).

## Example


```js
function searchCellHandler() {
     let value = "PR20012392"
     let fields = [ "RequestType", "ServiceCode" ];
     let startFieldIndex = fields.indexOf(grid.getCurrent().fieldName) + 1;
     let options = {
          fields : fields,
          value : value,
          startIndex: grid.getCurrent().itemIndex,
          startFieldIndex : startFieldIndex,
          wrap : true,
          caseSensitive : false;
          partialMatch : true
     }
     let index = grid.searchCell(options);
     grid.setCurrent(index);
}
```

## Events

| Property | Type | Description |
| --- | --- | --- |
| [compareCallback](/refs/Interface/SearchCellOptions#comparecallback) | [CompareCallback](/refs/realgrid#comparecallback) | Callbacks for custom conditions |

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [caseSensitive](/refs/Interface/SearchCellOptions#casesensitive) | boolean | Whether to search case sensitively |
| [columns](/refs/Interface/SearchCellOptions#columns) | string\[\] | Array of columns specified when the order of fields and columns is different |
| [fields](/refs/Interface/SearchCellOptions#fields) | string\[\] | List of fields to search |
| [parentId](/refs/Interface/SearchCellOptions#parentid) | number | It can only be used in the row-specific number of the parent tree [LocalTreeDataProvider](/refs/Class/LocalTreeDataProvider#searchdata). |
| [partialMatch](/refs/Interface/SearchCellOptions#partialmatch) | boolean | Whether to search also for inclusion |
| [reverse](/refs/Interface/SearchCellOptions#reverse) | boolean | Reverse Search |
| [select](/refs/Interface/SearchCellOptions#select) | boolean | Whether or not to select the searched row |
| [startFieldIndex](/refs/Interface/SearchCellOptions#startfieldindex) | number | Index of the field in the fields array to start searching from |
| [startIndex](/refs/Interface/SearchCellOptions#startindex) | number | Search start row |
| [value](/refs/Interface/SearchCellOptions#value) | string | Specified search condition value |
| [wrap](/refs/Interface/SearchCellOptions#wrap) | boolean | If there are no corresponding rows until the last row, whether to search again from the first row |

## Events Desc

### compareCallback

Callbacks for custom conditions

`Type` - [CompareCallback](/refs/realgrid#comparecallback)

**Example:**


```js
const f = function(v1, v2, sensitive, partialMatch) {
 if (v1 === v2) {
 return true;
 }
 let s1 = String(v1);
 let s2 = v2 == null ? undefined : String(v2);
 if (!s1 && !s2) {
 return true;
 }
 if (!s1 || !s2) {
 return false;
 }
 if (!caseSensitive) {
 s1 = s1.toLowerCase();
 s2 = s2.toLowerCase();
 }
 if (partialMatch) {
  return s2.indexOf(s1) >= 0;
 } else {
  return s1 == s2;
 }
}

let options = {
 fields : fields,
 value : value,
 compareCallback: f
}

let index = grid.searchCell(options);
```

<hr/>

## Properties Desc

### caseSensitive

Whether to search case sensitively

`Type` - boolean

<hr/>

### columns

Arrangement of columns specified when the order of fields and columns is different

`Type` - string\[\]

**Remarks:**

The search is performed in the order specified here. When using this property, [SearchCellOptions.fields](/refs/Interface/SearchCellOptions#fields) is not used.

<hr/>

### fields

List of fields to search

`Type` - string\[\]

**Remarks:**

Can be specified by field name or field index

<hr/>

### parentId

It can only be used in the row-specific number of the parent tree [LocalTreeDataProvider](/refs/Class/LocalTreeDataProvider#searchdata).

`Type` - number

<hr/>

### partialMatch

Whether to also search for inclusions

`Type` - boolean

<hr/>

### reverse

Reverse Search

`Type` - boolean

**Remarks:**

Searches in reverse order based on startFieldIndex, and if not found, searches the row above startIndex. If startIndex is not specified, the search starts from the last row.

<hr/>

### select

Whether to select searched rows

`Type` - boolean

**Remarks:**

If specified as `true`{/* */}, the searched row will be selected if it exists, and if it is outside the currently displayed range, it will be scrolled to be displayed.

<hr/>

### startFieldIndex

Index of the field in the fields array to start searching from

`Type` - number

**Remarks:**

let fields = \["a", "b", "c", "d"\]; If const startFieldIndex = 2, the search starts from the "c" field.

<hr/>

### startIndex

Search start row

`Type` - number

<hr/>

### value

Specified search condition value

`Type` - string

<hr/>

### wrap

If there are no corresponding rows until the last row, whether to search again from the first row.

`Type` - boolean

<hr/>