Page 1 of 1

Cannot able to find the count of rows and columns

Posted: Fri Mar 11, 2016 8:31 pm
by ningappa
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

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

Posted: Mon Mar 14, 2016 8:36 am
by odklizec
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