Brad Hazelnut
Brad Hazelnut

Reputation: 1621

Rebind a repeater control

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.

Upvotes: 0

Views: 708

Answers (1)

Uroš Goljat
Uroš Goljat

Reputation: 1816

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š

Upvotes: 0

Related Questions