How to identify the arguments required for the function GetColumnControl
From the help I can find
column
What values should I give for band index and Column key.
This how the recorder script comes
TableObject.SetCellData "0","CurrencyGuid","43219"
If I use TableObject.GetColumnControl("0;CurrencyGuid") , I am getting th error "Object required: 'GetColumnControl(...)'"
and if I use TableObject.GetColumnControl("1;CurrencyGuid") , I am getting the error,
Key not foundParameter name: key
How can I know the correct values for the Column Key,
I alluded to it before, in that you must have an EditorControl for GetColumnControl to work. Now granted this does make the assumption that you are working close enough with your developers to know which columns editors use a external control. But the previously stated test will let you know if it was defined or not.
As an aside a valuelist is a collection and not a control in and of itself, and therefore would not be picked up from GetColumnControl.
I hope this answers your question,
Hi Mike,
Another information I got is GetColumnControl will not work for list boxes which are populated using value list.
is this information correct.
For the benefit of the forum users, can you pls share the details where this method will word and where it will not work.
It should work exactly like I sent you previously, just with a different compare value, so instead of testing -1, test and empty string.
SET grid = SwfWindow("Form1").SwfTable("ultraGrid1")colEditorControlValue = grid.GetColumnControl("nBandIndex;sColumnKey")IF colEditorControlValue <> "" THEN SET colEditorControl = grid.GetColumnControl("nBandIndex;sColumnKey") ...END IF
Hi Mike ,
I am using Test Advantage Version 7.3CLR2.0
basically its returning a Nothing/ Blank value. because of which I am getting the error.
What could be a possible alternative?
band index will be 0 for the normal grids , right?
Actually in looking at it further the value -1 may be version specific, there were changes in the error reporting in version 8.1 of TestAdvantage. These changes may have changed the return value for when an exception is caught.
What version of NetAdvantage/TestAdvantage are you using?
Regardless of the version though it should still return a constant value for the error value, by the sounds of it, by your inability to use SET, it is a value type, and as such you can do a simple comparison test first, just to a different value.