Grid Population

I need to populate a grid from a comination of array lists (each array list is made up of business entities) that are returned from my business layer.

As far as I can see I have a few choices.

1. I can create a dataset with all the array lists and manually add the relations.   OR
2. I can set the data source of the grid to one of the array lists then populate the other fields as each row is loaded.

My question is, does anyone from experience which is the better option, there may even be a scenario I have missed.
rocky050371Asked:
Who is Participating?
 
iboutchkineCommented:
I would populate a datatable from different arrays and then bind dtd to datagrid

Dim data(1) As Object 'for adding to datarow

            data(0) = arr1(0)
            data(1) = arr2(2)
            dt.Rows.Add(data)

.....
etc

dg.DAtasource = dt

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.