props = SwfWindow("MainWindow").SwfTable("grid").GetNAProperties msgbox props
This topic provides reference information about the methods for accessing the properties and sub-properties of Infragistics controls.
This topic contains the following sections:
The following table maps the property access tasks with respective the Test Automation methods that implement them.
The following table briefly explains the methods for accessing the properties and sub-properties of Infragistics controls. The Operation level column of the table indicates whether the method operates on the control as a whole, at the control operational level, for example, on the whole grid, or on some of its parts (sub-item operational level), for example, a cell of the grid. Detailed information about the methods is provided in the text blocks following the table.
The accessibility of each method is specific to the control that is calling the method. For details, please refer to the documentation of the respective control, the Testable User Actions and Elements topic.
A utility method, GetNAProperties returns a list of the visible properties of the specified control or object and their data type.
In the returned list of properties, the custom-defined Test Automation properties are explicitly indicated.
The returned string value uses a carriage return linefeed (/n) to separate each property and a pipe (|) delimiter between the name, data type, and custom property indicator.
The following table explains the method’s parameters.
Example 1
Calling the GetNAProperties method on a UltraGrid and displaying the results in a message box:
props = SwfWindow("MainWindow").SwfTable("grid").GetNAProperties msgbox props
Example 2
Writing the results of the GetNAProperties method, called on an UltraGrid to a text file, UltraGrid_Props.txt :
fileName = "C:\ultraGrid_Props.txt" Set grid = SwfWindow("MainWindow").SwfTable("grid") Set fso = CreateObject("Scripting.FileSystemObject") Set myFile = fso.CreateTextFile(fileName, true) strProps = grid.GetNAProperties("") aryProps = split(strProps, vbCRLF) for index = 0 to ubound(aryProps) aryProp = split(aryProps(index), "|") for index2 = 0 to ubound(aryProp) myFile.Write(aryProp(index2) & vbTab) Next myFile.WriteLine() Next myFile.Close()
Example 3
Calling the GetNAProperties method, passing the oFullPropertyName parameter with value ViewSettings and returning a list of the object grid’s ViewSettings properties in a message box:
props = SwfWindow("MainWindow").SwfTable("grid").GetNAProperties("ActiveCell") msgbox props
This method returns the value of a property or sub-property of the specified control.
All Infragistics controls.
The following table explains the method’s parameters.
Calling the GetNAProperty method on a UltraGrid and displaying the results in a message box:
Set grid = SwfWindow("MainWindow").SwfTable("grid")
props = grid.GetNAProperty("GesturesEnabled") msgbox props
A utility method, GetSubItemProperties returns a list of the visible properties of a sub-item of the specified control.
This method returns a list consisting of all the property names of the specified sub-item, their data types, and a flag signaling that the property is a custom-defined Test Automation property. The string returned by this method uses a carriage return linefeed (/n) to separate each property and a pipe (|) delimiter between the name, data type, and custom property indicator.
WinSpreadSheet
The following table describes the method’s parameters.
Example 1
Getting the properties of a sub-item.
The following code gets the properties of the third grid cell in the Contact Details column and displays the results in a message box:
set book = SwfWindow("MainWindow").SwfObject("ultraSpreadsheet1") prop = book.GetSubItemProperties("sshtCell", "A3",) msgbox prop
Example 2
Getting the list of sub-properties of a specific property of a sub-item.
By providing the optional oFullPropertyName parameter, you will get a list of that property’s sub-properties. In the code below, "Text" passed as oFullPropertyName resulting in a list of the sub-properties of the cell’s Text property.set book = SwfWindow("MainWindow").SwfObject("ultraSpreadsheet1")
prop = book.GetSubItemProperties("sshtCell", "A3", "Text")
This method returns the value of a property or sub-property sub-item of the specified control (for example, the ).
WinSpreadsheet
The following table explains the method’s parameters.
As above, this example gets the SpreadSheetCell’s Text property, but instead returns the property’s value:
Set book = SwfWindow("MainWindow").SwfObject("ultraSpreadsheet1") prop = book.GetSubItemProperty("sshtCell", "A3", "Text") msgbox prop
This method sets the value of a property or sub-property of the specified control.
All Ultimate UI for Windows Forms controls.
The following table explains the method’s parameters.
Setting the value of AreHeadersVisible of a WinSpreadsheet called ultraSpreadSheet1 to False:
Set book = SwfWindow("MainWindow").SwfObject("ultraSpreadsheet1") book.SetNAProperty "AreHeadersVisible", "false"
This method sets the value of a sub-item property or sub-property of the specified control.
WinSpreadsheet
The following table explains the method’s parameters.
Set the value of an USpreadsheetCell:
Set book = SwfWindow("MainWindow").SwfObject("ultraSpreadsheet1") book.SetSubItemProperty "sshtCell", "A3", "Value", "42"
The following topics provide additional information related to this topic.