cancel
Showing results for 
Search instead for 
Did you mean: 

VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

SOLVED
Highlighted
New Contributor

VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

I have a grid control with 100 rows. The grid control is placed in a small window where only 10 rows are visible with need to scroll up/down to see the desired row.

 

Both 'Visible' & 'VisibleOnScreen' are TRUE even when the desired row is last in grid while viewing the top 10 rows. I am required to do a right-click to open a context menu on desired row.

 

How should I proceed to check if row is truly visible else scroll till visible?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

Hi,

 

> I am using DevExpress WPF GridControl.

I would recommend to check in the Object Browser if native .MakeRowVisible() method is accessible (it should be) and use it (like recommended, for example, here: https://www.devexpress.com/Support/Center/Question/Details/T110580/how-to-make-grid-scroll-to-a-row-...)

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
4 REPLIES 4
New Contributor

Re: VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

Hi @leeedwin005 ,

 

can you please tell what are all the properties you are using to find the required object.

and also can you please share the image of "Object browser" where you have selected the the required  (last)row which is visible on screen.

 

Regards,

Sathish

 

New Contributor

Re: VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

UnitRowIndex = FindGridRowIndexByValue(GridObject, "Unit", UnitID)
Set UnitRowObject =GetObjectRowByIndex(GridObject, UnitRowIndex)

I can get the row index from the grid. With this, I could use GridObject.ClickRowIndicator to scroll to desired row with help from stated. (ref: https://community.smartbear.com/t5/TestComplete-Desktop-Testing/How-to-click-the-control-which-is-no...).

 

However, the row indicator is HIDDEN in my grid thus ClickRowIndicator call will give me the error: 'There was an attempt to perform an action at point (0, 0) which is transparent or out of the window bounds.'.

 

Is there any alternative to ClickRowIndicator?

BTW, I am using DevExpress WPF GridControl.

Community Hero

Re: VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

Hi,

 

> I am using DevExpress WPF GridControl.

I would recommend to check in the Object Browser if native .MakeRowVisible() method is accessible (it should be) and use it (like recommended, for example, here: https://www.devexpress.com/Support/Center/Question/Details/T110580/how-to-make-grid-scroll-to-a-row-...)

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: VisibleOnScreen is TRUE when row in grid control is not visible (need scrolling to view row)

'GridObject.ClickRowIndicator(UnitRowIndex - 1) 'Replaced by the following
GridObject.View.ScrollIntoView(UnitRowIndex - 1)

Thanks for the tip. Using the native code works (finally a green tick).

 

New Here?
Join us and watch the welcome video:
SeptemberNews
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win