The following table briefly explains the recordable methods for testing the control. Detailed information about the methods is provided in the text blocks following the table.
Method
Description
ClearRecordFilters
Clears all filters for a specified record.
OpenCustomFilterDialog
Opens the Custom Filter Selection dialog when the user chooses the (Custom) option from the filter menu.
SelectFilter
Selects a filter value from the filter icons.
SetFilterCellCompOperator
Sets a comparison operator in the specified filter cell.
ClearRecordFilters
Description
The ClearRecordFilters method is used for recording and replaying the clearing of all filters for a specified record. This method records the clicking of the Clear button positioned on the left in xamDataGrid control.
Details
When replaying, this method performs some validations first and then clears all record filters:
Validating the specified record path
Clearing the filters’ values
The method accepts the record path as a parameter.
The record path is formed in the following way:
root record number
{root record number}{parent record number}
{root record number}{parent record number}{child record number}
…
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Record path
Using the record path as a parameter.
Example
Setting filter for two fields – supplier and amount and clearing all the filters for the specified FILTER record after that:
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
Exception name
Exception description
Possible reasons
The following record was not found.
The record cannot be located when replaying the method.
The record doesn’t exist or is hidden.
The argument is malformed.
The parameter is not format correctly.
The method parameter is not correctly formatted.
OpenCustomFilterDialog
Description
The OpenCustomFilterDialog method is used for recording and replaying the opening of the Custom Filter Selection dialog. This dailog appears when a user chooses the option (Custom) from the filter menu for a specified field.
Details
This method takes a header path as a required parameter.
The path is formed by concatenating the record path and the field name or field index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Header path
Using the header path as a parameter.
Example
Opening the Custom Filter Selection dialog for amount field:
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
Exception name
Exception description
Possible reasons
The following record was not found.
The record cannot be located when replaying the method.
The record doesn’t exist or is hidden.
The argument is malformed.
The parameter is not format correctly.
The method parameter is not correctly formatted.
Filtering not allowed on the supplied field.
The filtering cannot be performed when replaying the method.
Filtering is disabled.
SelectFilter
Description
The SelectFilter method is used for recording and replaying data filtering through the filter icons (when the xamDataPresenter property FilterUIType is set to LabelIcons ).
Details
The method accepts as parameters the header path and a value from the filter drop-down list.
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Header path
Option from the filter drop-down menu
Using the header path and an option from the filter drop-down menu as parameters.
Example
Choosing the option David McCullough from the filter drop-down menu and filtering the data in the Author field:
This topic provides reference information about the recordable user methods for testing the navigation and selection actions in xamDataPresenter™ controls.
This topic provides reference information about the recordable user methods for testing the sorting and grouping user actions in xamDataPresenter™ controls.