我在转发器中绑定了5条记录
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table id="example" class="table table-hover" cellspacing="0" width="100%">
<thead>
<tr>
<th> <h3 style="font-size:24px;margin-top: 20px;margin-bottom: 20px; margin-left: 40px;"><b>Teacher Posts</b></h3></th>
</tr>
</thead>
<tbody id="examplecontent">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<div class='col-md-12'>
<div class='col-xs-10'>
<div class='media'>
<div class="pull-left">
<a href='#'>
<img src='<%#Eval("Picture") %>' style='height: 100px; width: 100px;' runat="server" />
</a>
</div>
<div class="p-lg-left media-body">
<h4 class="oProfileTileTitle media-heading">
<a href='<%#Eval("Teacher_id","~/Pages/Teacher/TProfile.aspx?recid={0}") %>' runat="server" class="jsShortName" title="Nicolas Baud"><%#Eval("TeacherName") %></a>
</h4>
<p class="jsTitle lead ng-binding m-md-bottom"><%#Eval("Title") %></p>
<span class="glyphicon glyphicon-map-marker"></span><strong class="jsCountry"><%#Eval("CountryAdd") %></strong><span class="text-muted">
-
<span class="jsLastActivity"><%#Eval("Created_Date") %>
</span>
-
<span class="jsTests">Class: <span class="btn-link fw-200"><%#Eval("class") %></span></span>
-
<span class="jsPortfolios">Subject: <span class="btn-link fw-200"><%#Eval("SubName") %></span></span></span>
<p class="oDescription ng-isolate-scope">
<!-- ngIf: !open -->
<span class="ng-binding ng-scope"><%#Eval("Description") %></span>
</p>
</div>
</div>
</div>
</div>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
然后1分钟后,我使用jQuery Ajax获取另外5条记录,并在<tbody>
中附加这些记录。
之后:
$("#examplecontent").append(content);
所以它工作正常,但问题是我正在使用 在Ajax获取后,DataTables和DataTables的搜索栏不起作用。
用户无法搜索使用Ajax提取的数据。
屏幕截图1:
屏幕截图2: