List items into a datarow?

datatable

#1

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!


#2

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);


#3

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

list.ToArray()


#4

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