Good morning,
I have a Ultragrid which has a combo box in it. When I record, the value will work with the SetCellData if it is correct. Some of our values have trailing spaces and some do not. I need to get the combo box from the cell. Then I can process the items to see if the specified value is available. If available I can select the value.
Can you tell me how to get the combo box object so I can work with it?
Regards,
Brian
Hi Brian,
I am not sure of how you mean with your distinction between short description and long description as those are not properties of a ValueListItem, and your developer may be getting them from any number of places. That being said the members of a ValueListItem can be found in our online help here.
I would try both DisplayText and DataValue as these are most likely.
So in code either :
sListValues = sListValues + objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "].DataValue") & vbCRLF
or
sListValues = sListValues + objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "].DisplayText") & vbCRLF
Hi Michael.
I tried to DataValue: sListDispValues = sListDispValues & objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "].DataValue") & vbCRLF
but I get the following error:
Type 'Summit.Framework.View.DDItem' in Assembly 'Framework, Version=5.30.9245.1139, Culture=neutral, PublicKeyToken=1984b01ba11e2fd5' is not marked as serializable.
Line (19): "sListDispValues = sListDispValues & objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "].DataValue") & vbCRLF".
The value returned by the original code: sListValues = sListValues & objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "]") & vbCRLF
And the new for DisplayText: sListTextValues = sListTextValues & objectTable.GetNAProperty(sValListItems & "["& cstr(x) & "].DisplayText") & vbCRLF
Both return the value is the list here are some examples
Displayed Value after selection
Displayed Description in List
"" or Empty String value
None
SECID
Security ID
ABI
ABI(Italy)
I need to select by the Displayed Values for some columns and the Description for others. The text is coming from the database and is dynamic. Sometimes we get extra spaces which is why I need to get the value.
In other combo elements I get a singe value such as "";None, or SECID:SecurityID.
Let me know if this clears things up.
You will likely have to ask your developer about Type 'Summit.Framework.View.DDItem', as this is likely a value type specific to them. The exception "is not marked as serializable" basically means it's a custom data type, that was not made in a way to be passed out of the .NET framework cleanly. GetNAProperty can dig into it further as it is doing so while still in the .NET framework and return a serializable property value from it. Likely in your case you are looking for a string value. Your developer should know the property names of that object and which one is the one you should use.
If you are using TestAdvantage 10.3 or later, you can use the GetNAProperties method, which is used similarly to GetNAProperty, but instead of attempting to return the value of the property of the name you supplied, it instead returns all of that available property names and their datatype names, off of the property value of the name you supplied.
Hi Mike,
I spoke to the person I work with on this project. Laurie recalls that we could not use the 10.3 advantage on the application since the company used a earlier version of the toolkit to build the code. Can we install the 10.3 to get the information and then use this in the 2007 toolkit code in QTP.
Thank you for your help,
Hi Michael,
Here are the versions of the DLLs which are in the appliation directory.
Can we use the TestAdvantage 10.3 with this version of code?