- I have two arrays
- I want to add them in datatable
- The data table have 2 columns
- I want add 1st array in 1st column & 2nd array in 2nd column.
- Both array values corresponding to each other
how can i do this?
i’m not getting
i used for each to iterate that array & add values to datatable by using add data row
Kindly Share Image or Screenshot of your Input and your expected output
Regards
VP
- Build Datatable with 2 columns
- Use for each on first array and use add data row
- Use one more for each on second array but now use assign instead of add datarow and in for each you have an index property assign a int32 type variable to it(index)
dt.Rows(index)("Yoursecondcolumnname") = currentitem
I believe you used add datarow also in second loop
cheers
yes i used
in the second array loop as I said do not use add datarow …add the data using assign as I specified above
cheers
2nd column is blank its not writing
I hope both array are of same length then directly us the below
- Use for each with in argument as
enumerable.range(0,array1.count()-1).toarray
and chnage type argument to int32 - Use add datarow with array as
{array1(currentitem),array2(currentitem)}
Cheers
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.