我有一个数据表,其中显示了一个名为 Reference 的字段。我还有一个显示最新条目的新闻提要,它也具有相同的参考字段。
我正在寻找一种解决方案,通过单击新闻提要中的超链接,将过滤数据表以仅显示该引用。
这甚至可能吗?如果是这样,一些例子将是最受欢迎的。
问候
jQuery 代码。
$.datepicker.regional[""].dateFormat = 'dd/mm/yy';
$.datepicker.setDefaults($.datepicker.regional['']);
oTable = $('#tblMessageDetail').dataTable({
"aaData": dtDetailData,
"aLengthMenu": [[50, 100, -1], [50, 100, "ALL"]],
// 'aStripClasses': null,
"iDisplayLength": 50,
//"aaSorting": [[0, "asc"]],
"bJQueryUI": true,
//"bAutoWidth": false,
//"bProcessing": true,
// "sDom": 'RC<"clear">lfrtip',
"sDom": 'RC<"H"lfr>t<"F"ip>',
"aoColumnDefs": [
{"bVisible": false, "aTargets": [11,12,13,14]}
],
// "sDom": 'C<"top"lfr>t<"F"ip>',
//"sPaginationType": "full_numbers",
//"bRetrieve": true,
//Scrolling .......
"sScrollY": "250px",
"sScrollX": "100%",
"sScrollXInner": "100%",
"bScrollCollapse": true,
//Dynamic Language .......
"oLanguage": {
"sZeroRecords": "There are no messages that match your search criteria",
"sLengthMenu": "Display _MENU_ records per page ",
"sInfo": "Displaying _START_ to _END_ of _TOTAL_ records",
"sInfoEmpty": "Showing 0 to 0 of 0 records",
"sInfoFiltered": "(filtered from _MAX_ total records)",
"sEmptyTable": 'No Rows to display.....!',
"sSearch": "Search all columns:"
},
"oSearch": {
"sSearch": "",
"bRegex": false,
"bSmart": true
}
});
现在是 asp.net 中继器:
<div class="module_content">
<asp:Repeater runat="server" ID="rptSenderBIC" >
<ItemTemplate>
<div class="message">
<p><strong>Message Type: </strong><asp:Literal ID="ltMessageDetail"
runat="server" Text='<%# Eval("MsgType") %>'></asp:Literal></p>
<p><strong>Message Date: </strong><asp:Literal ID="ltMsgDate"
runat="server" Text='<%# Eval("MsgDate") %>'></asp:Literal></p>
<p><strong>Message Time: </strong><asp:Literal ID="ltMsgTime"
runat="server" Text='<%# Eval("MsgTime") %>'></asp:Literal></p>
<p><strong>Reference: </strong><a href="#"><asp:Literal ID="ltMsgRef"
runat="server" Text='<%# Eval("MsgRef") %>'></asp:Literal></a></p>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
所以,中继器的参考被选中,它的值应该在数据表中过滤