Add Data Row - ArrayRow function

Hi all

I’ve set up a data table with the headers -

‘Continent’ ’ Competition Name’ Start Date’ ‘End Date’

As I get the data to populate the data table (stored as 4 string variables strContinent, strCompetitionName, etc), can I use the add data row - ‘ArrayRow’ function to pass the information to the data table? Please can I ask how to write the code for this? I believe it involves using the {} but I can’t quite get it right.

Thanks in advance

Create a DataTable and define columns as in the following: DataTable table = new DataTable();
Add rows as in the following: table.Rows.Add(111, “Devesh”, “Ghaziabad”);
Binding DataGridView as in the following: dataGridView1.DataSource=table;
Running the code, the following will be the screen.
To know more visit our page:

Yeah use “Add data row” activity. And pass the respective data with that datatype in a “Array row” property.

Say {“Continent”," Competition Name", “Start Date”, “End Date”} I assumed that all columns contains string datatype.

Hope it helps,



Hey @Sriram07 thank you for the reply, those are the correct headers, how do I then pass in the data to go in to these columns in the datatable (e.g how to I get the strContinent variable to populate the Continent column?)



Hello @jordrowley
whenever you are copying any text from UiPath forum…
always replace double quotes by passing double quotes via your keyboard…

and by this

@Sriram07 meant something like

1 Like

@jordrowley kindly accept @Sriram07’s answer as solution… as he was the original poster… I just pointed out the issue with copy and paste from forum to other application

Sure, thanks both, my xmal works :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.