Add Data column Coding clarification

Hello,

I have attached screenshot of my current activity, Here I am trying to build a data table and passing data columns into that.

By using New DataColumn(), I am only be able to create a single column is there a code to make it as an array of columns.
Tried New DataColumn(){} error is thrown as end of expression required.

I do not want to do it by using Add datacolumn activity’s, Column array option.

Also is there a way to add a row by using New DataRow method.

Please suggest.

Regards,
Vasan.
image

HI @Mohan_Vasan

You can try with add data row activity

Regards
Gokul

Hi Gokul,

Eventually I have to use add data row or add data column activity to add it to datatable.

But i want the values to be added by using Codes, to build DataRows and DataColums

Is there a code to create an array of Data Rows and Data columns. by using New DataColumn, New DataRow codes.

Regards,
Vasan.

Have you tried with SQL queries?

Refer this link too

Regards
Gokul

Thanks Gokul, I will look into that

Hi @Mohan_Vasan

As per your query understood that you are having columns as a array you need to add column as a from the list of array right?

You may try with below method!

Regards

Check this link How to Add Multiple Data Columns To A Datatable At Once? - #7 by arivu96