Cannot able to find the count of rows and columns

Ask general questions here.
Posts: 2
Joined: Fri Mar 04, 2016 7:07 pm

Cannot able to find the count of rows and columns

Post by ningappa » Fri Mar 11, 2016 8:31 pm

Not able get the row count of the table(RadGridView)in a desktop application. It returns row and column count as 0 all the time.

Please help me here

Here's my code:

var radGridView = repo.BlockTimes.RadGridView;
var tablerowscount = radGridView.Rows.Count;

Ranorex version: 5.4.5
.NET Runtime Version: 4
OS: Windows 10 Enterprise
AUT: .NET-based desktop application

Please see attached screenshot of the repository properties
(959.72 KiB) Downloaded 44 times

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6548
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Cannot able to find the count of rows and columns

Post by odklizec » Mon Mar 14, 2016 8:36 am


I'm afraid, some Telerik controls are not so easily automatable with Ranorex. I believe it's because of their incorrect implementation of accessibility? Additionally, they make their own test automation tool called Test Studio so they most probably don't care about automation with other tools, as long as their controls work with their own test automation solution? ;)

If you check the snapshot in Spy, there is nothing like a row count available for given control. So the only way how to find the number of rows seems to be using PART_GridViewVirtualizingPanel and code like this...

Code: Select all

IList<Ranorex.Row> rowList = repo.PART_GridViewVirtualizingPanel.Find<Ranorex.Row>(./Row);  
int numOfRows = rowList.Count;
rowcount.png (53.44 KiB) Viewed 1083 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration