The GEN:SearchFilter tag searches for a text string within a table of records, allowing application users to search data in the displayed table. The resulting table control shows matching records. The search control is added automatically to any Table Report page where one or more fields (table columns) are designated as being searchable.
The search control is automatically added to any table where one or more data fields have been designated as “searchable” by the application developer. |
The SearchFilter tag displays a text box for the application user to enter a value to be searched. The search can be performed against any field in a table using a comparison operator. Only designated columns are searched by the search control.
If the control type is a text box, then the control must be bound to a button. When the button is pressed, the value entered by the application user is searched for within the table.
This tag requires a binding between it and another control, typically the table that it modifies. You must manually connect the control to the table in the Property Sheet.
The fields searched by the SearchFilter are not required to be displayed in the table shown to the user.
One of the principal features of the search controls is the interactive search feature. Interactive search provides list of suggestions after you type several characters. It fetches list of suggestions by sending request to a web service in the page’s code-behind file which in turn queries the database for a matching set of records.
The interactive search feature has several constraints:
Interactive search is an Enterprise Edition feature.
.NET Framework 2.0 / 3.0 are the only supported frameworks.
This feature can only be used with SearchFilter controls.
Interactive search will not work with Date fields.
This feature does not work with search controls which are inside a repeater. Also, the feature won’t work in search controls that are in a table’s repeater inside of another table.
We strongly recommend you index the specific database columns that participate in interactive search. This will significantly improve performance.
Interactive search is controlled by several properties.
<GEN:SearchFilter Name=“Search”/>
These properties control specific types of controls created by Iron Speed Designer.
Property |
Description |
||||||
Automatic type ahead AutoTypeAhead |
Enables automatic type-ahead search. Auto type ahead does not apply to binary fields such as a Word document.
|
||||||
Delay before fetching AutoTypeAheadDelay |
The time, in milliseconds, that must pass before the Automatic Type Ahead feature fetches suggestions from the database. The value may be any integer greater than 0. The default value is “Default” which represents the value specified in the Application Generation Options dialog. If the property is not present, then “Default” is assumed. |
||||||
Matched string display AutoTypeAheadDisplayFoundText |
Specifies how to display matched text strings.
|
||||||
Maximum list size AutoTypeAheadListSize |
The maximum number of suggestions returned from the database by the Automatic Type Ahead feature. The default value is “Default” which represents the value specified in the Application Generation Options dialog. If the property is not present then “Default” is assumed. |
||||||
Minimum number of characters AutoTypeAheadMinChars |
The minimum number of characters that must be entered (typed) into the search control before Automatic Type Ahead fetches suggestions from the database. The default value is “Default” which represents the value specified in the Application Generation Options dialog. If the property is not present, then “Default” is assumed. |
||||||
Search method AutoTypeAheadSearch |
Specifies how to search within text strings.
The default value is “WordsStartingWithSearchString”. |
||||||
Word separators AutoTypeAheadWordSeparators |
Specifies a regular expression representing non-alphabetic characters that form a word boundary. AutoTypeAheadWordSeperators works only when the “Search method” property is “WordsStartingWithSearchString”. The default value is [^a-zA-Z0-9]. Iron Speed Designer does not validate this string for syntactic correctness, so please be careful when changing the value. |
See ASP.NET Control Properties for details.
The width of the suggestion list box is governed by Columns property for the SearchArea text box. The default value is 50 characters.
When interactive search is enabled (AutoTypeAhead is ‘True’) and the SearchArea control’s operator is set to “EqualsTo”, the feature attempts to find records whose values start with the typed text.
When interactive search is disabled and the SearchArea control’s operator is set to “EqualsTo” (Operator is ‘EqualsTo’), the feature attempt to find records where the data is equal to the typed text.
When search text is typed into a search control, the interactive search feature returns a list of suggestions. The suggestion item’s length may not be equal to the length specified by ‘Columns’ property if the suggestion item contains new line. If a suggested item contains new-line characters before the search text then it displays text after new line. If it contains a new-line after the search text then the text is displayed upto the new line.
For URL fields, the interactive search works only if the complete string ‘http://’ is typed or if the URL is typed without ‘http://’.
Code Generation Tag Properties
Part II: Configuring Full Text Search