Pulling data from server

Pulling data from server

SxChocSxChoc Posts: 6Questions: 0Answers: 0
edited May 2013 in General
Hi,

Is it possible for me to pull a block of data from webservice pulling into a SQL back end and use this for the datatable but still run all processing (filtering, sorting, pagination, etc.) on the client side.

And if it is in what format should I return the data? I'm trying to use a stringBuilder and build exactly in exactly the format that exists on the static source examples on this site.

So my html page looks like:

var pageUrl = 'http://localhost:64102/WebService/wsJQueryDBCall.asmx'
$('#example').dataTable( {
"bProcessing": false,
"bPaginate": false,
"aaSorting": [[ 3, "asc" ], [0, "asc"]],
//"sAjaxSource": "sources/CraigAjaxCall.txt",
"sAjaxSource": pageUrl + "/ReadDatatable"...........................................

And my webservice:

sb.Append("\"aaData\": [");
if (myDatatable.Rows.Count > 0)
{
foreach (DataRow myDataRow in myDatatable.Rows)
{
//myMemberRow["email_address"].ToString().TrimEnd();
sb.Append(myDataRow["dataRow"].ToString().TrimEnd() );
}
}
else
{
sb.Append("No Records Found");
}
sb.Append("]");
return sb.ToString();

And an example of a row exactly as the stored procedure returns it:

["Youth Courts ","Criminal Litigation","Conference","26/06/2013","London","London","5.00","420.00","210.00","0","20130626","0"]

Currently this isn't working. Can anyone shed any light as to what I'm doing wrong please?

Thanks,
Craig
This discussion has been closed.