Question:
I tried to place wild-card (e.g. ‘%Ken%’) for the searching of records in a DataWindow through QueryMode, but couldn’t get the result. Are there any other ways to do the searching?
Answer:
The best way to do searching in a DataWindow is by using the find command. The find command lets you embed most of the datawindow functions that you can normally use in an expression painter.
Therefore you can use two very powerful commands to achieve the result you are looking for. These are mainly POS and MATCH. With Pos you could say:
dw_1.Find( "Pos( name, 'ken' ) > 0", 1 , dw_1.RowCount() )
To match any case you can use:
dw_1.Find( "Pos( Lower( name ), 'ken' ) > 0", 1 , dw_1.RowCount() )
If you want to get very sophisticated, you can use the Match function which provides for wildcards, character ranges and many other features.