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
85
How to enter text inside a TextBox present inside SSUltraGrid ActiveX Infragistic Grid
posted

My application is using a Infragistic Grid that QTP learns as an ActiveX object. I have already confirmed in the past that this grid happens to be from a earlier version of Infragistics, that is not supported by the Test Advantage addin. I have created workaround functions based on descriptive programming through which I am able to read values from the cells. However, I am facing the following issue. There are few columns in the grid which contain Text box, List box and button. I am able to successfully navigate to the desired cell and select it, but not able to enter text in the textbox. I can use the concept of Device Replay to send characters but in orer to do that, I need to first click inside the cell, which I am not able to achieve. I am posting the code thru which I am able to select the cell. Is there a way that I can actually click in the cell. Any help is highly appreciated.


Set objActiveX = WpfWindow("devname:=MyProduct").ActiveX("acx_name:=XYZ....")
Set objGrid = objAct.Object
Set objRow = objGrid.GetRow(0)
intColCount=objGrid.Bands(0).Columns.Count
For intCounter = 0 To intColCount - 1
 strColHeader = objGrid.Bands(0).Columns(intCounter).Header.Caption
 Set objCol  = objGrid.Bands(0).Columns(intCounter)
 If objCol.Hidden = False and Trim(strColHeader) <> "" Then
  If strColHeader = "MyDesiredColumnName" Then
   Set objGrid.ActiveCell= objRow.Cells(intCounter)
'   The Above line would select that row but doesn't insert the cursor in the TextBox, that is present in that cell. How do I enter my text?
   Exit For
  End If
 End If
Next

Parents
No Data
Reply
  • 6729
    Offline posted

    Hi,

    You might have better responses if you posted this question to HP support.

    This Forum if solely for Infragistics .Net Windows Forms controls and I don't think anyone has worked with ActiveX controls.

    Regards,

    Ammar

Children
No Data