or
read: {
url: "http://localhost:58871/grid-wcf-crud/Products.svc/Read", //specify the URL which data should return the records. This is the Read method of the Products.svc service.
contentType: "application/json; charset=utf-8", // tells the web service to serialize JSON
type: "POST" //use HTTP POST request as the default GET is not allowed for svc
},
<script> $(document).ready(function () { $("#grid").kendoGrid({ dataSource: { schema: { model: { id: "RecordID", fields: { RecordID: { editable: false, nullable: true }, FirstName: { editable: true }, LastName: { editable: true } } } }, type: "odata", serverPaging: true, serverSorting: true, pageSize: 100, batch: false, transport: { read: "http://localhost:1625/Data/GetPatients", create: { url: "http://localhost:1625/Data/Create", contentType: "application/json; charset=utf-8", type: "POST" }, update: { url: "http://localhost:1625/Data/Update", contentType: "application/json; charset=utf-8", type: "POST" }, destroy: { url: "http://localhost:1625/Data/Destroy", contentType: "application/json; charset=utf-8", type: "POST", dataType: "json" }, parameterMap: function (data, operation) { if (operation !== "read") { return { jsonData: kendo.stringify(data) }; } else { return kendo.data.transports["odata"].parameterMap(data, operation); } } } }, height: 500, scrollable: { virtual: true }, editable: true, sortable: true, toolbar: ["create", "save"], columns: ["RecordID", "FirstName", "LastName", { command: "destroy"}] }); });</script><System.Web.Mvc.HttpPost()> _Public Function Destroy(ByVal jsonData As List(Of Patient)) As System.Web.Mvc.ActionResult 'Code to delete the record... Return Json(Nothing)End Function

hi all, new to kendo, new to json. Can't seem to get any data into a kendo.data.DataSource. Am using the new 2012 q1 mobile release and ASP.NET MVC 3. Here's my code:
js:
// create a template using the definition on the application page (the .cshtml file) var templateFundingSources = kendo.template($("#template-funding-sources").html()); dataSource = new kendo.data.DataSource({ transport: { read: { url: "/Home/GetCardFundings", // the remove service url dataType: "json", // JSONP (JSON with padding) is required for cross-domain AJAX data: { //additional parameters sent to the remote service _cardId: cardID } } }, schema: { data: "cardFunding", model: { id: "CardID", fields: { CardID: { type: "number", nullable: false }, RemainingBalance: { type: "number" } } } }, change: function () { // subscribe to the CHANGE event of the data source $("#listview-card-fundings").html(kendo.render(templateFundingSources, this.view())); } }); dataSource.read();
//test data source to see it's defined dataSource.add({ cardID: 4, remainingBalance: 34 });
and MVC code:public JsonResult GetCardFundings(int _cardId) { List<CardFunding> cfs = new List<CardFunding>(); CardFunding cf = new CardFunding(); cf.CardID = 1; cf.RemainingBalance = 3; cfs.Add(cf); CardFunding cf1 = new CardFunding(); cf1.CardID = 1; cf1.RemainingBalance = 3; cfs.Add(cf); return Json(cfs, JsonRequestBehavior.AllowGet); }
The server-side code gets called and returned, and no execptions are tripped anywhere there or in the .js.
Any help greatly appreciated.
Kendo team: Awesome job on the project. Looking forward to mastering your framework.