Page 1 of 1

Use datasource to populate table/datagrid

Posted: Wed Feb 06, 2019 2:27 pm
by albcp81
Hello,

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;

//Or
foreach(Row row in table.Rows){

Ranorex.Row row = new Row();

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

table.Rows.Add(row);
}
What would be the approach to do this?

Thanks in advance for your help.

Re: Use datasource to populate table/datagrid

Posted: Thu Feb 07, 2019 2:23 pm
by McTurtle
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.

Regards,
McTurtle