Use datasource to populate table/datagrid

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 1
Joined: Wed Feb 06, 2019 1:55 pm

Use datasource to populate table/datagrid

Post by albcp81 » Wed Feb 06, 2019 2:27 pm


How could I populate a table in my AUT using a datasource?

I am using user code and datasource is an Excel connector. The idea is that with every iteration I can populate the table in my AUT with different values.

The proces would be something like this (just descriptive, not actual nor correct code syntax):

Ranorex.Table table = myRepo.table_1;

table = mydatasource;

foreach(Row row in table.Rows){

Ranorex.Row row = new Row();

row[index] = mydatasource[col][cell].value

What would be the approach to do this?

Thanks in advance for your help.

Posts: 217
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Use datasource to populate table/datagrid

Post by McTurtle » Thu Feb 07, 2019 2:23 pm

Hi albcp81,

The table in your AUT can all be populated in a single go? It's like an excel table where you would theoretically be able to enter all the data at once? I think it's better if you post a Ranorex Snapshot of the data table. If possible, please also post a sample excel table or a screenshot of one that you would use.