Note that there are some explanatory texts on larger screens.

plurals
  1. POBinding Kendo Grid with Webservice
    primarykey
    data
    text
    <p>i am using kendo Grid but i am having a problem that i am not able to bind my grid with data from webservice plz help me </p> <p>My web service look like this</p> <pre><code>[WebMethod] public string GetCustomers() { string data = default(string); using (var documentStore = new DocumentStore { Url = "http://haseeb-pc:8080/" }.Initialize()) { using (var session = documentStore.OpenSession()) { var query = session.Query&lt;Customer&gt;().Select(customer =&gt; new { FirstName = customer.FirstName, LastName = customer.LastName, Email = customer.Email, }).Take(20); var serializer = new JavaScriptSerializer(); return serializer.Serialize(query); } } } </code></pre> <p>and i have an html page which have a div </p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="../Scripts/jquery-1.7.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../Scripts/KendoScript.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../Scripts/KendoScripts/kendo.all.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;link href="../Scripts/styles/kendo.common.min.css" rel="stylesheet" type="text/css" /&gt; &lt;link href="../Scripts/styles/kendo.default.min.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="../Scripts/KendoScripts/kendo.web.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="CustomerGridView"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>now finally my script file is this:</p> <pre><code>$(function () { alert("Welcome To Kendo"); var dataSource = new kendo.data.DataSource( { transport: { read: { contentType: "application/json; charset=utf-8", type: "POST", dataType: "json", url: "/CustomerService.asmx/GetCustomers" } }, pageSize: 10, schema: { data: "d" } }); alert(dataSource); $("#CustomerGridView").kendoGrid({ dataSource: dataSource, height: 250, scrollable: true, sortable: true, pageable: true, columns: [ { field: "FirstName", title: "First Name" }, { field: "LastName", title: "Last Name" }, { field: "Email", title: "Email" } ], editable: "popup", toolbar: ["create"] }); }); </code></pre> <p>my problem is my kendo grid is not binding plz help me to bind my grid</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload