WpfWindow("WPFApplication1").XamGrid("xamGrid1").CopyToClipboard
This topic provides reference information about the recordable user methods related to the testing of the editing in the xamGrid™ control.
This topic contains the following sections:
The following table summarizes the purpose and functionality of the recordable methods for testing the editing in the xamGrid control.
The CopyToClipboard method copies the selected cell(s) to the clipboard. This action is recorded when the user presses Ctrl-C while at least one cell is selected.
This method accepts no parameters.
Copying the data from the selected cells to the clipboard:
WpfWindow("WPFApplication1").XamGrid("xamGrid1").CopyToClipboard
No default setting.
When XamGrid.ClipboardSettings.AllowCopy == false
Cannot perform the specified action [CopyToClipboard] .
The ExitEditMode method is recorded in a test when, after editing a row or a cell, the user accepts the data changes or presses the ESC key to cancel changes.
When replaying the method, the row or cell exits Edit mode.
This method is useful when the entered data is not valid and the update should be canceled.
This method takes a boolean value as a parameter.
The following table maps the desired configuration to parameters settings.
Changing the cell value and canceling the update after that:
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{0}[CustomerID]","BOLID12" WpfWindow("WPFApplication1").XamGrid("xamGrid1").ExitEditMode True
Changing the cell value, accepting changes and exiting from the editing mode:
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{0}[CustomerID]","BOLID12" WpfWindow("WPFApplication1").XamGrid("xamGrid1").ExitEditMode
No default setting.
No known exceptions.
The PasteFromClipboard method pastes the copied cell(s) from the clipboard to the xamGrid. This action is recorded when the user presses Ctrl-V in the xamGrid while at least one cell is in the clipboard.
This method accepts no parameters.
Pasting the cells into the xamGrid from the clipboard:
WpfWindow("WPFApplication1").XamGrid("xamGrid1").PasteFromClipboard
No default setting.
When XamGrid.ClipboardSettings.AllowPaste == false
Cannot perform the specified action [PasteFromClipboard] .
The RowEnterEditMode method is recorded in a test when a row enters Edit mode.
When replaying the method:
The row address is validated.
The row is set to Edit mode.
The method accepts the row path as a parameter.
The path is formed by concatenating the row paths (the parenthesis are part of the syntax):
{row path}
The path is formed by concatenating together the parent row’ indexes and the target row’s index; the concatenation goes, left to right, in descending hierarchical order, from the root row index down to the sub-row’s indexes and finally to the target row’s index. If the path consists of more than one index, all indexes must be surrounded by parentheses.
For example:
The target row is the first root row: 0
The target row is the first sub-row of the first root row: {0}{0}
The target row is the third sub-row of the first sub-row of the first root row: {0}{0}{2}
The following table maps the desired configuration to parameters settings.
The first row is editable and a new value is set in the CustomerID column. After that, the row exits Edit mode and changes are accepted.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").RowEnterEditMode 0 WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{0}[CustomerID]","TestID" WpfWindow("WPFApplication1").XamGrid("xamGrid1").ExitEditMode
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SetCellData method is recorded in a test when a value is changed in a xamGrid cell.
When replaying the method:
The provided cell address is validated.
If the cell exists, the cell is is set to Edit mode and then its value is modified.
The cell exits Edit mode.
The method accepts as parameters the cell path and the new value to be set.
The path is formed by concatenating the row path and the column key (the parenthesis and the brackets are part of the syntax):
{row path}[column key]
For example, the cross-section of the first row and the column key is denoted as {0}[key], the cross-section of the first child row of the first row and the column key is denoted as {0}{0}[key].
The following table maps the desired configuration to parameters settings.
Setting a new value to the cell in the first row and column CustomerID .
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{0}[CustomerID]", "New Value"
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The following topics provide additional information related to this topic.