没有回发的数据表重新加载 [英] Datatable Reload Without Postback
本文介绍了没有回发的数据表重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我有评论grdiview。添加新注释时,应该重新加载gridivew,但不使用jquery回发。 gridview不可能,因为它是服务器端控件。如何在不使用gridview的情况下实现此目的。我可以使用经典表,但我不知道该怎么做。有人帮我吗?
Hello, I have a comment grdiview. When a new comment added , gridivew should be reload but without postback with jquery. It is not possible with gridview because it is server side control. How can I achieve this without using gridview. I can use classic table but I don't know how to do it. Anyone help me?
推荐答案
您可以使用jQuery数据表: https:// www.datatables.net/ [ ^ ]
并将其初始化为:
You can use jQuery Datatables for this: https://www.datatables.net/[^]
and initialize it like:
( document )。ready( function (){
(document).ready(function(){
(' #myTable')。DataTable();
});
('#myTable').DataTable(); });
然后你可以进行ajax调用并获取数组数据以在客户端重新加载它,如:
and then you can make ajax call and get the array data to reload it on client side like:
这篇关于没有回发的数据表重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文