List items into a datarow?

Guys @vvaidya @aksh1yadav @akhi_s27 @Vikas.Jain @badita @beesheep,

How to convert a list of items into a datarow, so it can be added to a datatable. else is there another way ?

appreciate your help/thoughts.

Thanks!

1 Like

it helps if you have prior .Net, Java or PHP knowledge.

DataRow DR = ExistingDataTable.NewRow();

DR(Column1) = ListOfItems(0);
DR(Column2) = ListOfItems(1);
.
.
.

ExistingDataTable.Rows.Add(DR);

2 Likes

Did you try passing the list in Add Data Row - ArrayRow property?

list.ToArray()

5 Likes

I tried list.toarray() after posting here and it worked. Thanks guys.

1 Like