Hi all I have been looking for a lot of relative resource to deal with my problem, however it isn't useful to me, even if I have checked the "jQuery Bootgrid" and many websites , I still didn't find any great example out, hopefully someone who really know it can help me to give me any slim clues or any good simple.
By the way,
1. I wish I can use Ajax to update and see any modifies data between Browser and DB
2. Plesae give me example code
Thanks
Some problems issue
1.Ajax Connection
Front end
<table id="grid-data" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="id" data-type="numeric">ID</th>
<th data-column-id="sender" data-css-class="sender">Sender</th>
<th data-column-id="received" data-order="desc">Received</th>
</tr>
</thead>
</table>
<script>
var grid = $("#grid-data").bootgrid({
ajax: true,
url: "WebForm3.aspx/x" // link to your web api
});
</script>
Back End
public partial class WebForm3 : System.Web.UI.Page
{
[WebMethod]
public static string x()
{
return "";
}
}
Messages
Uncaught SyntaxError: Unexpected token < in JSON at position 6
at JSON.parse (<anonymous>)
at Function.n.parseJSON (jquery-2.1.1.min.js:4)
at Object.success (jquery.bootgrid.min.js:6)
at j (jquery-2.1.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.1.1.min.js:2)
at x (jquery-2.1.1.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-2.1.1.min.js:4)