Answered by:
One repeater bind 4 apart table get data.

Question
-
User197255166 posted
Hi everyone,
I have a single repeater. 4 queries from separate tables I want to pull a single repeater. How is this possible. I'm waiting for your help.
For example,
I have one repeater. I get data 4 seperate table. I will bind one repeater.
Code Behind.
DataTable table = customerRep.GetActivityView(obj.CustomerId); for (int i = 0; i < table.Rows.Count; i++) { rpt.DataSource = table; rpt.DataBind(); } DataTable tablem = customerRep.GetDeliveryView(obj.CustomerId); for (int i = 0; i < tablem.Rows.Count; i++) { rpt.DataSource = tablem; rpt.DataBind(); } DataTable tables = customerRep.GetOfferView(obj.CustomerId); for (int i = 0; i < tables.Rows.Count; i++) { rpt.DataSource = tables; rpt.DataBind(); } DataTable tablen = customerRep.GetOrderView(obj.CustomerId); for (int i = 0; i < tablen.Rows.Count; i++) { rpt.DataSource = tablen; rpt.DataBind(); }
Html Code
<asp:Repeater ID="rpt" runat="server"> <HeaderTemplate> <table id="sector-list" class="table table-striped table-bordered"> <thead> <tr> <th>Tarih</th> <th>Personel</th> <th>İşlem</th> <%--<th>Durum</th> --%> <th>Tutar</th> </tr> </thead> </HeaderTemplate> <ItemTemplate> <tr> <td><%#DataBinder.Eval(Container.DataItem,"InsertDate","{0:dd.MM.yyyy}") %></td> <td><%#DataBinder.Eval(Container.DataItem,"InsertUserName") %></td> <td><%#DataBinder.Eval(Container.DataItem,"Process") %></td> <%-- <td><%#DataBinder.Eval(Container.DataItem,"Note1") %></td>--%> <td><%#DataBinder.Eval(Container.DataItem,"Total","{0:C}") %></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater>
Thursday, May 26, 2016 9:47 PM
Answers
-
User1724605321 posted
Hi Aliyilmaz,
Can you send me example.Then refer to below examples :
Best Regards,
Nan Yu
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, May 30, 2016 1:34 AM
All replies
-
User1724605321 posted
Hi Aliyilmaz,
Repeater only bind one DataTable one time . You could make a new temporary DataTable , create required columns , merge the four DataTable records into one . Then bind the temporary DataTable to Repeater. If not, you can think about the nested Repeater to show them.'
Best Regards,
Nan Yu
Friday, May 27, 2016 7:23 AM -
User197255166 posted
Can you send me example.
Saturday, May 28, 2016 9:41 PM -
User1724605321 posted
Hi Aliyilmaz,
Can you send me example.Then refer to below examples :
Best Regards,
Nan Yu
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, May 30, 2016 1:34 AM