Forum Discussion

krkarthik_info's avatar
krkarthik_info
Frequent Contributor
9 years ago

How to click the control which is not visible on screen

Hi All,

 

I have a Infragistics control XamDataGrid in my application which contains multiple RecordListItemContainer for multiple rows/records. By default the grid shows only 4 rows in a visible region. If the grid is having 10 rows and I need to select 8th row, for that I need to scroll down to select the 8th row.

 

Through automation I wrote a function to select the specified row. Function works perfectly fine till 4 rows. On passing row no as 8 to the function, it thrown the error as "The action may be performed incorrectly, because the control is not visible. "

 

Can someone provide me a solution to select the row which is not visible on the screen.

 

Thanks in advance.

 

Thanks,

Karthik K R

  • Does your grid have row indicators? If so, you can try ClickRowIndicator:

    gridObj.ClickRowIndicator(rowIndex)

    It should automatically scroll the grid to the specified row.