Class SearchPage
Create an object of this class to draw a search screen, typically to be launched from e.g. a Find menu button. Specify your Search box and Grid using the appropriate properties. Includes a Find button and Clear Button. Displays Saved Searches drop down. Displays Group Action buttons to allow New Document etc. for the result set as applicable. Initial state should be search box only, no grid.
public class SearchPage : Web
- Inheritance
-
SearchPage
- Inherited Members
Constructors
SearchPage(string, string)
Initializes a new instance of SearchPage.
public SearchPage(string searchBoxName, string listName)
Parameters
Properties
ClearButton
Controls if the ClearButton button will be displayed.
public bool ClearButton { get; set; }
Property Value
isSavedSearch
Returns true when the postback comes from a saved search.
public bool isSavedSearch { get; }
Property Value
ListName
The Grid that is used for the search.
public string ListName { get; }
Property Value
NewButton
Set to true if you want a 'new' button to appear that navigates to data entry screen for your entity.
public bool NewButton { get; set; }
Property Value
- bool
false
ResultsGrid
Gets the List grid with the search results.
public List ResultsGrid { get; }
Property Value
SavedSearch
Set to True if want to support saved searches.
public bool SavedSearch { get; set; }
Property Value
Remarks
The default is false.
SearchBoxName
The Search Screen shown on the page.
public string SearchBoxName { get; }
Property Value
SearchButton
Controls if the search button will be displayed
public bool SearchButton { get; set; }
Property Value
SearchScreen
Gets the filter screen.
public EntryGroup SearchScreen { get; }
Property Value
ShowDeletedFields
This property will enable or disable the Deleted Record filter.
public bool ShowDeletedFields { get; set; }
Property Value
Methods
AddClearButton()
This adds a button that Clears the current search. It is called from the BuildContents method. The default Clear button submits the page, setting the HiddenMode field to Clear.
public virtual void AddClearButton()
AddNewButton()
This adds a button that allows the user to navigate to the data entry screen for the entity. "RunDataPageNew" must be a function in the Custom .NET Dll for this page to work. The property NewButton must be set to true in your custom page.
public virtual void AddNewButton()
AddSearchButton()
This adds a button that does the search using the values set by the user in the search EntryGroup. It is called from the BuildContents method. The default Search button submits the page, setting the HiddenMode field to Save.
public virtual void AddSearchButton()
BuildContents()
This is the main control method for the SearchPage. It draws the Search EntryGroup and the buttons. If the mode is Save then it executes a search and shows the results in the list. If the mode is Clear then it clears the search.
public override void BuildContents()
~SearchPage()
Destructor for the Searchpage class.
protected ~SearchPage()
SetTopContent()
The topcontent cannot be overriden when the page is invoke from NEW or FIND context.
[Obsolete("Use the method add top content")]
public virtual void SetTopContent()