DataRow add header information from another DataRow

Hi, I have a DataRow containing content. The columns of this DataRow do not have column names.

I have another DataRow containing the header names as the cell contents (not column names).

How do I add the header information from the contents of this DataRow as the column names of the DataRow containing the content?

Need an efficient solution, thanks


Since you are dealing with two data rows here, i guess to combine these two, you need a datatable. So that the first row will contain the row with headers and the other row will have the values.

Steps to follow.

  1. Create a datatable and initialize it. May be its the best to use build data table activity since you know the structure
  2. Use invoke method activity to add the two rows to thw datatable.
    In the target, mention the datatable name
    In the method name mention ImportRow
    Under the collection property mention the data row variable

Let know how this works for you