DisplayBox.findItem

Availability

Flash Player 7.

Usage

DisplayBox.findItem(searchData,[fieldName,searchType,caseSensitive,fieldName2,searchData2])

Parameters

searchData The text you are looking for in a particular field.

fieldName Optional; The name of the column you would like to search as you specified in the name property of the columns tab in the parameters tab. default: : the sIDX field which contains the IDX you created the row with using DisplayBox.addListItem()

searchType Optional; What kind of search would you like to perform: default : "exact"

caseSensitive Optional; Determines if the function should match case when comparing values. default : true

fieldName2 Optional; The name of the column you would like to search as you specified in the name property of the columns tab in the parameters tab. This is used if you would like to make the search dependant on 2 columns. The second search will be an exact match search only.

searchData2 Optional; The text you are looking for in the field specified by fieldName2.

Returns

An array set to the ID's of the matching rows..

Description

Function; Locates all rows matching the search text you specify. This will not only highlight the rows, but will also return an Array filled with the ID's of the rows that match this criteria.

Example

In this example we have created a DisplayBox which holds a simple contact list. One of the columns is named WholeName. This will fill myArray with any contact whose WholeName begins with Jones and will pay no attention to the case sensitivity of the text. ie Jones is the same as JONES.

var myArray=new Array();

myArray=myDisplayBox.findItem("Jones","WholeName","start",false);

Author

Telsim, Inc.