|
Iron Speed Designer automatically creates dropdown lists on Show Table pages known as "Field Filters". A Field Filter control
filters a table of records based on the value selected in the dropdown. This customization pre-selects an item in a field filter dropdown
list control and filters the records with the matching values.
Normally, a Show Table page displays all records in a database table or view when the default value in the Field Filter is set to "All".
Sometimes, you might want to display records specific to some value in a Field Filter when the page is initially displayed. The example shows how to
set the default value of a FieldFilter on a Show Table page and filter the table records.
You can set the default value of a filter when a page loads the first time and filter the data based on the default value. To accomplish this, the example overrides the CreateWhereClause()
method in the TableControl class and sets the item selected in the FieldFilter. Then, overrides the PopulateTableFilter() method in the TableControl class to filter the page
This customization will be added in:
..\<Application Name>\App_Code\<Table Name>\Show<Table Name>Table.Controls.cs
For example: C:\MyApp1\App_Code\Customers\ShowCustomersTable.Controls.cs
|