Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
How do you retrieve and set the value of a Combo Box in Ultragrid using QTP
posted

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

Parents
  • 7695
    Offline posted

      That depends highly on how, where and when the combobox's gets it's data as well as what the combobox actually is. By default, I would say you should be able to use GetNAProperty to get either the cell's or the columns ValueList property, and look at it's ValueListItems. But it is also quite possible that the combobox is a customized editor that doesn't follow that methodology or place of storage for it's data, or that it only populates the combobox on dropdown, and the valuelists are empty prior to that. For the later you can activate the cell, then PerformAction gridEnterEditModeAndDropdown, then try to get the value of the valuelists. If none of those work, I would suggest contacting your developer and learning more about this particular instance of combobox itself.

    As to QTP getting ahold of the specific combobox, in most scenarios the combobox is an editor component and not really a control. In which case QTP has no knowledge of it, as it only interacts with objects that inherit form System.Windows.Forms.Control.

     

Reply Children