Cannot able to find the count of rows and columns

Ask general questions here.
ningappa
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

Hi,
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;
Report.Info("tablerowscount");


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
Attachments
TableGrid_Snapshot.rxsnp
(959.72 KiB) Downloaded 34 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
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

Hi,

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
rowcount.png (53.44 KiB) Viewed 558 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