This topic provides an overview of the recording and replaying actions available within the WinPivotGrid™ control proxy using the UltraPivotGridTestobject object to represent the corresponding sub items and behaviors.
This topic contains the following sections:
The following preview illustrates the Index mode as a single integer of a 0-based index making it easier to identify cells; however, the headers can only be identified by the primary header, for example, headers bordered with cells.
Coordinate based index mode consists of a 0-based two-dimensional array of integer.
The first index is the row of the header.
The second index is the column of the header.
Columns can span both rows and columns returning a single header by multiple different combinations of coordinates. Consider the following coordinates for the outlined color-coded elements in the screenshot illustrated below it:
The Reseller Freight Cost, outlined in pale blue, is represented by ARRAY(4,1)
The CY 2001 outlined in lime green may be represented by any of the following, ARRAY(3,1)
, ARRAY (3,2)
, or ARRAY(3,3)
The String based mode is an array of strings representing the path from the top row down in the case of columns or the left column right in the case of rows. In some scenarios, there may be repeat string values under the same parent. In those cases, the duplicates will add a zero based index identifier after the string during recording. In most cases, you will only see this on the summary row\columns.
For example, in the above illustration the “ Reseller Freight Cost ” lined in pale blue would be…
ARRAY(“All Products”, “Accessories”, “All Products”, “Reseller Freight Cost”)
The “ CY 2001 ” lined in lime green, will be identified as ARRAY(“All Periods”, “CY 2001#1”)
, as this “ CY 2001 ” is the second child with that text under the “ All Periods ” parent.
The WinPivotGrid elements are identified by Sub items triggered by user input to different actions. This section provides you with detail information about those actions and behaviors with examples of the recorded scripts.
Activates the identified pivot cell.
The following table summarizes the methods parameters followed by code examples where applicable.
The following 3 code examples will all activate the same cell:
SwfTable("Identifier").ActivateCell 0,0
SwfTable("Identifier").ActivateCell ARRAY(0, 3), ARRAY(3,0)
SwfTable("Identifier").ActivateCell ARRAY(“All Periods”, “CY 2001”, “H2 CY 2001”, “Q3 CY 2001”), ARRAY(“All Products”, “Accessories”, “All Products”, Reseller Sales Amount”)
The following list contains the possible exceptions to this method and the likely reason causing them.
The specified {0} index [{1}] is out of range.
The following {0} [{1}] was not found.
Sorts the identified column.
The following table summarizes the methods parameters followed by code examples where applicable.
The following 3 code examples will all activate the same cell:
SwfTable("Identifier").SortColumn 0, pvtgAscending
SwfTable("Identifier").SortColumn ARRAY(0, 3), pvtgDescending
SwfTable("Identifier").SortColumn ARRAY(“All Products”, “Accessories”, “All Products”, Reseller Sales Amount”), pvtgAscending
The following list contains the possible exceptions to this method and the likely reason causing them.
The specified {0} index [{1}] is out of range
The following {0} [{1}] was not found
Sorting is disabled
The point required to perform the operation is not visible
The specified value [oeSortDirection] is invalid
Selects the identified row or column header.
The following table summarizes the method’s parameters followed by code examples where applicable.
Selects the first row:
SwfTable("Identifier").SelectHeader pvtgHeaderRow, 0
Selects: All Periods, CY 2003, H2 CY 2003 to the row header:
SwfTable("Identifier"). SelectHeader pvtgHeaderRow, ARRAY(“All Periods”, “CY 2003”, “H2 CY 2003”), true
Adds the column header to the selection:
SwfTable("Identifier"). SelectHeader pvtgHeaderColumn, 2, false, true
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is any invalid options, valid options are [pvtgHeaderRow, pvtgHeaderColumn]
The specified {0} index [{1}] is out-of-range The following {0} [{1}] was not found
Selection of item type [{0}] is disabled
Cannot perform a span selection across multiple types
Selects the identified cell.
The following table summarizes the methods parameters followed by code examples where applicable.
Selects the first row:
SwfTable("Identifier").SelectHeader pvtgHeaderRow, 0
Selects: All Periods, CY 2003, H2 CY 2003 to the row header:
SwfTable("Identifier"). SelectHeader pvtgHeaderRow, ARRAY(“All Periods”, “CY 2003”, “H2 CY 2003”), true
Adds the column header to the selection:
SwfTable("Identifier"). SelectHeader pvtgHeaderColumn, 2, false, true
The following list contains the possible exceptions to this method and the likely reason causing them.
The supplied option is an invalid options, where the only valid options are [pvtgHeaderRow, pvtgHeaderColumn]
The specified {0} index [{1}] is out-of-range.
The following {0} [{1}] was not found
Selection of item type [{0}] disabled
Attempted to perform a span selection across multiple types
Expands the identified header.
The following table summarizes the method’s parameters followed by code examples where applicable.
Expands the first row:
SwfTable("Identifier").ExpandHeader pvtgHeaderRow, 0
Expands the row header, All Periods, CY 2001, H2 CY 2001, Q3 CY 2001:
SwfTable("Identifier"). ExpandHeader pvtgHeaderRow, ARRAY(“All Periods”, “CY 2001”, “H2 CY2001”, “Q3 CY 2001”)
The following list contains the possible exceptions to this method and their likely causes.
The supplied option is invalid options; the only valid options are [pvtgHeaderRow, pvtgHeaderColumn].
The specified {0} index [{1}] is out of range.
The following {0} [{1}] was not found.
Cannot expand the header supplied.
Collapses the identified header.
The following table summarizes the methods parameters followed by code examples where applicable.
Collapses the row header at row 0, column 2:
SwfTable("Identifier").CollapseHeader pvtgHeaderRow, ARRAY(0, 2)
Collapses the row header, All Periods, CY 2001, H2 CY 2001:
SwfTable("Identifier"). CollapseHeader pvtgHeaderRow, ARRAY(“All Periods”, “CY 2001”, “H2 CY 2001”)
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options; valid options are [pvtgHeaderRow, pvtgHeaderColumn].
The specified {0} index [{1}] is out of range.
The following {0} [{1}] was not found.
Cannot collapse the header supplied.
Resizes the identified header.
The following table summarizes the methods parameters followed by code examples where applicable.
Auto-size the second column:
SwfTable("Identifier").ExpandHeader pvtgHeaderColumn, 1
Sets the column header width to 200, “All Periods”, “CY 2001”, “H2 CY 2001”, and “Q3 CY 2001”.
SwfTable("Identifier"). ExpandHeader pvtgHeaderColumn, ARRAY(“All Periods”, “CY 2001”, “H2 CY2001”, “Q3 CY 2001”), 200
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options, valid options are [pvtgHeaderRow, pvtgHeaderColumn]
The specified {0} index [{1}] is out of range
The following {0} [{1}] was not found.
Cannot resize the header supplied.
Clicks to remove the DropItem from the PivotGrid DropItemArea.
The following table summarizes the methods parameters followed by code examples where applicable.
Remove the DropItem:
SwfTable("Identifier").RemoveDropItem pvtgColumnArea, “Category”
Remove the first measure DropItem:
SwfTable("Identifier"). RemoveDropItem pvtgMeasureArea, 0
The following is the only possible exception to this method and the likely reason causing it:
The option supplied is not one of the valid options; valid options are [pvtgFilterArea, pvtgMeasureArea, pvtgRowArea, pvtgColumnArea].
Drops down the filter of the identified DropItem.
The following table summarizes the methods parameters followed by code examples where applicable.
Drops down the filter for the Column DropItem Category:
SwfTable("Identifier").DropdownDropItemFilter pvtgColumnArea, “Category”
Drops down the filter of the first measure DropItem:
SwfTable("Identifier"). DropdownDropItemFilter pvtgMeasureArea, 0
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options; valid options are [pvtgFilterArea, pvtgMeasureArea, pvtgRowArea, pvtgColumnArea].
Filtering not enabled for [oDropItemArg].
Closes up the filter of the identified DropItem.
The following table summarizes the methods parameters followed by code examples where applicable.
Closes up the Filter for the Column DropItem Category:
SwfTable("Identifier").DropdownDropItemFilter pvtgColumnArea, “Category”
Closes up the filter of the first measure DropItem:
SwfTable("Identifier").DropdownDropItemFilter pvtgMeasureArea, 0
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is invalid options; valid options are [pvtgFilterArea, pvtgMeasureArea, pvtgRowArea, pvtgColumnArea].
Filtering disenabled for [oDropItemArg].
Starts a drag operation on the specified sub item by pressing and holding the left mouse button down on it, and moving the cursor.
Hold the mouse down on a sub item (from DataSelector) and start a drag action on to the grid.
The following table summarizes the methods parameters followed by code examples where applicable.
The following list contains the possible exceptions to this method and the likely reason causing them.
Option [{oRegion}] is not one of the valid options.
Option [{oeSubItemType}] is not one of the valid options.
The following {eSubItemType} [{oSubItem}] was not found.
{oSubItem} is not visible.
Finishes a drag operation dropping on the specified sub item by moving the cursor over the sub item, then releasing the left mouse button.
After starting a drag action, move the cursor over the tree node on the DataSelector , and release the mouse button.
The following table summarizes the methods parameters followed by code examples where applicable.
The following list contains the possible exceptions to this method and the likely reason causing them.
Option [{oRegion}] is not one of the valid options.
Option [{oeSubItemType}] is not one of the valid options.
The following {eSubItemType} [{oSubItem}] was not found.
{oSubItem} is not visible.
Finishes a drag operation dropping on the specified section of the source control by moving the cursor over the supplied location, then releasing the mouse button.
After starting a drag action, move the cursor over the tree node on the DataSelector, and release the mouse button.
The following table summarizes the methods parameters followed by code examples where applicable.
The following is the only possible exception to this method and the likely reason causing it.
Option [{oRegion}] is not one of the valid options.
Scrolling a drop area, one DropItem in the supplied direction.
The following table summarizes the methods parameters followed by code examples where applicable.
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options; valid options are [pvtgFilterArea, pvtgMeasureArea, pvtgRowArea, pvtgColumnArea].
The option supplied is not one of the valid options; valid options are [micScrollLeftOrUp, micScrollRightOrDown].
Returns a delimited string of the row path for the active cell.
Returns a delimited string of the column path for the active cell.
Returns the value for the supplied cell.
The following table summarizes the methods parameters followed by code examples where applicable.
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options, valid options are [pvtgHeaderRow, pvtgHeaderColumn]
The specified {0} index [{1}] is out of range
The following {0} [{1}] was not found.
Returns the formatted value for the supplied cell.
The following table summarizes the methods parameters followed by code examples where applicable.
The following list contains the possible exceptions to this method and the likely reason causing them.
The option supplied is not one of the valid options, valid options are [pvtgHeaderRow, pvtgHeaderColumn]
The specified {0} index [{1}] is out of range
The following {0} [{1}] was not found.
Returns the count of columns.
Returns the count of rows.
Retrieves the drop items for a drop area.
The following table summarizes the methods parameters followed by code examples where applicable.
The following is the only possible exception to this method and the likely reason causing it.
The option supplied is not one of the valid options; valid options are [pvtgFilterArea, pvtgMeasureArea, pvtgRowArea, pvtgColumnArea].
The following topics provide additional information related to this topic.