SearchColumn Method

 Searches each cell in the specified column for a given text string.

DataGridObject.SearchColumn(ColIndex, StartRow, FindText, CaseSensitive)

Client support

   Newlook Smartclient

   Newlook Server

Use

This method is used to search a column for cells with a text value matching the string specified in the method's FindText argument. Only the cells within the specified column will be searched. Note that the comparison must match the whole of the cell's contents (eg. searching for "abc" will not match a cell value of "xabcx").

Arguments

ColIndex - (Integer, Required)

The index of the column that is to be searched.

StartRow - (Integer, Required)

The index of the row in which to start the search. Specify -1 in this argument to search from the first row.

FindText - (String, Required)

A string containing the text to search for. The string must be specified in quotation marks.

CaseSensitive - (Boolean, Required)

A value which indicates whether the search is case sensitive or not. True requires an exact match whereas False will search for the text irrespective of case (i.e. 'A' matches 'a').

Returns

This method returns an integer value representing the index of the first row in which the FindText was found.  If the string could not be found this method returns a value of -1.

Applies To

DataGrid control

See Also

SortColumn method


© 2004-2021 looksoftware. All rights reserved.