Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?
Posted

You can use jQuery Datatables for this: https://www.datatables.net/[^]

and initialize it like:

JavaScript
$(document).ready(function(){
    $('#myTable').DataTable();
});


and then you can make ajax call and get the array data to reload it on client side like:

JavaScript
$('#myTable').dataTable().fnAddData(array_ajax_data);


Hope this helps!
 
Share this answer
 
Thanks but I am not good on jquery. Can you take a link for example project? I could not find for me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900