Hi,
I am working on a .net Application, So this application when we add a data it will create a row in the table.
I want to know the total number of row a table have. So what code or function should I use.
OS: Windows 7
Ranorex Studio 5.2
Please help me out in this
Table Snapshot attached
Regards,
Nishant Singh
How to Find tottal number of row present in Table
-
- Posts: 39
- Joined: Thu Oct 09, 2014 1:15 pm
- Location: Bangalore
How to Find tottal number of row present in Table
You do not have the required permissions to view the files attached to this post.
Regrads,
Nishant Singh
Nishant Singh
Re: How to Find tottal number of row present in Table
Hi,
You can find an example of table reading/manipulation code here:
http://www.ranorex.com/support/user-gui ... html#c7781
Basically, the code for extracting the number of table rows is this:
tableAdapter.Rows.Count
So all you need to do is to get that example code and reduce it to bare minimum
Eventually, you can use this code:
You can find an example of table reading/manipulation code here:
http://www.ranorex.com/support/user-gui ... html#c7781
Basically, the code for extracting the number of table rows is this:
tableAdapter.Rows.Count
So all you need to do is to get that example code and reduce it to bare minimum

Eventually, you can use this code:
Code: Select all
public void TableRowsCount_Repo(Ranorex.Adapter repoItem)
{
// cast repoItem to Table (where the repoItem is table name stored in repository)
Ranorex.Table table = repoItem.As <Ranorex.Table>();
int tableRowsCount = table.Rows.Count;
Ranorex.Report.Log (ReportLevel.Success, "Table Rows count:" + tableRowsCount.ToString());
}
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 39
- Joined: Thu Oct 09, 2014 1:15 pm
- Location: Bangalore
Re: How to Find tottal number of row present in Table
Thanks a lot yes its woking fine.
Regards,
Nishant Singh
Regards,
Nishant Singh
Regrads,
Nishant Singh
Nishant Singh