///
/// Override the CreateWhereClause(). If the search text box is empty
/// set RunQuery = False. RunQuery = False will not execute the query for the table.
/// This will return zero records and table control will be empty.
///
public override WhereClause CreateWhereClause()
{
WhereClause wc = base.CreateWhereClause();
// If base.CreateWhereClause() returns nothing,
// create a new instance of WhereClause.
if (wc == null)
{
wc = new WhereClause();
}
// If no value is entered in the search area hide the table control
if (!MiscUtils.IsValueSelected(this.${Table}Search) && !(this.InSession(this.${Table}Search)))
{
// Set RunQuery = False
wc.RunQuery = false;
}
return wc;
}
|