WpfWindow("WPFApplication1").XamGrid("xamGrid1").GroupByColumn "[Company]", 0
This topic provides reference information about the recordable user methods related to the testing of the sorting and grouping 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 sorting and grouping in the xamGrid control.
The GroupByColumn method records and replays the grouping of data by a specified column.
The GroupByColumn method is recorded in a test when:
The xamGrid data is grouped by a column.
Multiple-column grouping is performed by dragging column headers to other positions in the group B y area.
When replaying the method:
The specified column header is verified.
A check is performed to verify that grouping is allowed for the specified column.
A check is performed to verify that the groupBy area is visible.
The specified groupBy column header position in the groupBy area is verified.
The grouping is performed.
The method accepts as parameters the column header name or the column header index in the groupBy area when multiple columns grouping is performed.
The following table maps the desired configuration to its parameters’ settings.
Grouping data in the xamGrid by the Company column.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").GroupByColumn "[Company]", 0
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SortColumn method records and replays the sorting of data by a specified column.
The SortColumn method is recorded in a test when the column header is clicked and sorting is performed.
When replaying the method:
The specified column header is verified.
The specified sorting direction is verified.
A check is performed to verify that checked if sorting is enabled.
Sorting is performed.
The method accepts as parameters the column header name, the sorting direction, and a boolean parameter that indicates whether multiple-column sorting is performed.
The sorting direction options are listed in the xamGrid - Enumeration Reference topic.
The following table maps the desired configuration to its parameters’ settings.
Performing multiple xamGrid data sorting – first (primary) sorting by the CustomerID column and then sorting of the Company and ContactName columns.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SortColumn "[CustomerID]",igAscending
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SortColumn "[Company]",igAscending, True
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SortColumn "[ContactName]",igAscending, True
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The UnGroupColumn method records and replays the ungrouping of data by a specified column if grouping action by this column has been previously performed.
When replaying the method:
The specified column header is verified.
A check is performed to verify that grouping is allowed for the specified column.
A check is performed to verify that the groupBy area is visible.
Ungrouping is performed.
The method accepts as a parameter the column header.
The following table maps the desired configuration to parameters settings.
Ungrouping data in the xamGrid by the Company column.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").UnGroupColumn "[Company]"
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.