Here is my HTML table:
id="example1" class="table table-bordered table-striped"> Check Box Category Name Category Details Status Action Other browsers All others yes for Ummm
I have already bound the HTML table using jQuery. Here is my jQuery code:$(document).ready(function() { debugger $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebForm5.aspx/BindDatatable", data: "{}", dataType: "json", success: function (dt) { for (var i = 0; i < dt.d.length; i++) { $("#example1").append(" " + dt.d[i].CategoryID + " " + dt.d[i].Name + " " + dt.d[i].description + " "); } }, error: function (result) { alert("Error"); } }); });My problem is that the table is binding at not at thats why jQuery paging, searching, sorting is not working. I Want to bind at . What is wrong with my code? Can anyone help me out?i am using this link:http://www.aspdotnet-suresh.com/2012/03/bind-data-and-display-datatable-on-aspx.html 2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeev PunhaniPosted Jul 8, 2016, 2:51 PM
If the above solution is helpful then,accept the answer.
kalu singh raoPosted Jul 8, 2016, 2:09 PM
for (var i = 0; i < data.d.length; i++)
{
if(i = 0)
{
data = "
}
else
{
data = data + "
}
}
$("#tbDetails").append(data);