0
votes

I have multiple data tables that i want to loop through and bind to a repeater control. It seems like its not possible to do that, when i loop through my data tables and bind each one to the repeater control. It only seems to bind the last one. How can i get this to work or is it even possible?

I have 2 datatables:

Datatable1
=============
1
15
27

Datatable2
============
18
35
69

I am trying to bind both of those datatables, but i want it to bind the first display the data, and then bind the 2nd and display its data.

1
Why don't you just merge all the datatables into one and bind to that? - MikeSmithDev
Yeah, that's what I'd do. It's probably the easiest solution, too. Just use a foreach on each row of each table, make a big table, then bind the repeater to that. - Drew

1 Answers

0
votes

I don't think it is possible to achieve what you like to do.

As a workaround you may join the two data tables into one and add a column to identify from which data table each row was inserted. Then data-bind the joined data table to you repeater.

Regards,

Uroš