Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get Single result on kendo.data.Datasource
    primarykey
    data
    text
    <p>I have an Odata result like this</p> <pre><code> {"odata.metadata":"https://localhost/DocTalkMobileWebApiOData/odata/$metadata#MasterPatient/@Element","PatUniqueId":"39e713db-6a0e-4e59-bf7b-033f4fc47ad5", "PatID":null, "pat_lname":"White","pat_fname":"Peter","pat_mi":" ","pat_ssn":"270787655","pat_dob":"08/07/1973","pat_sex":"M","pat_status":null,"priInsID":2,"secInsID":1,"PCPID":1,"InternalDrID":1,"EXPID":1,"EXPDate":"","pat_phone":null,"isNew":true,"imported":true,"byWhom":"dt","lastUpdate":"2011-03-30T09:41:57.36","changeStamp":"AAAAAAAAIUE=","address":"","city":"","state":"","zip":"","currentMcp":"","currentVisitCount":-2,"otherId":"543674","pcpName":null,"hasChanges":true,"ProgramSource":null,"mrnID":"","createdBy":null,"createdDate":"2007-10-26T10:16:15","expLocation":null,"ethnicId":1,"prefLanguageId":1,"raceId":1 } </code></pre> <p>and i tried to get this result via kendo.ui.datasource:</p> <pre><code> newPatient = new kendo.data.DataSource({ type: 'odata', // &lt;-- Include OData style params on query string. transport: { read: { url: url + '/MasterPatient(guid\'00000000-0000-0000-0000-000000000000\')', // &lt;-- Get data from here dataType: "json" // &lt;-- The default was "jsonp" }, parameterMap: function (options, type) { var paramMap = kendo.data.transports.odata.parameterMap(options); delete paramMap.$inlinecount; // &lt;-- remove inlinecount parameter. delete paramMap.$format; // &lt;-- remove format parameter. return paramMap; } }, schema: { data: function (data) { return data; }, total: function (data) { return data['odata.count'] }, } }); newPatient.fetch(function () { kendo.bind($('#newPatientTab'), newPatient); }); </code></pre> <p>But not sure why it always throw error :</p> <pre><code>Uncaught TypeError: Object [object global] has no method 'slice' </code></pre> <p>Please help me. Thanks</p>
    singulars
    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