ITabColumnSearch.AddCondition

Syntax

AddCondition(Row: Integer; Text: String; CaseSensitive: Boolean; WholeWordsOnly: Boolean);

Parameters

Row is the number of the row based on which the search condition is set.

Text - the text, which should be searched in cells.

CaseSensitive - the parameter defining whether character case should be taken into account during search.

WholeWordsOnly is the parameter which determines, whether the whole word should be searched.

Description

The AddCondition method adds a search condition.

Example

To execute the example a form with a button on this form named Button1, a component UiTabSheet named UiTabSheet1 and a component TabSheetBox are required. UiTabSheet1 is the data source for the TabSheetBox component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

TSheet: ITabSheet;

ColumnSearch: ITabColumnSearch;

Result: ITabSearchResult;

i: Integer;

Begin

TSheet := UiTabSheet1.TabSheet;

ColumnSearch := TSheet.CreateColumnSearch;

ColumnSearch.AddCondition(0, "1", False, True);

ColumnSearch.AddCondition(1, "10", False, True);

Result := ColumnSearch.Execute;

If Result <> Null Then

i := Result.CurrentColumn;

End If;

End Sub Button1OnClick;

Click this button to find a column that contains the value 1 in the first row and the value 10 in the second row. If the search is successful the i variable contains the number of the obtained column.

See also:

ITabColumnSearch