Note that there are some explanatory texts on larger screens.

plurals
  1. POExtJS grid not binding when adding a new property to JSON string
    primarykey
    data
    text
    <p>I am getting the following JSON string as response from my restful WCF service: </p> <p>{"GetAlbumResult":[{"AlbumList":[{"artist":"Kanjoliya","id":128,"name":"Gopal"},{"artist":"Kapoor","id":143,"name":"Lalit"},{"artist":"Ayachit","id":138,"name":"Madhukar"},{"artist":"Chouhan","id":142,"name":"Manish"},{"artist":"Narayanan","id":146,"name":"Manoj"}],"results":5}]}</p> <p>and this is my code to bind the ExtJS grid:</p> <pre><code> Ext.define('DHT.store.Users', { extend: 'Ext.data.Store', autoLoad: true, autoSync: true, model: 'DHT.model.User', proxy: { type: 'ajax', timeout: 120000, noCache: false, api: { read: 'http://localhost:52984/ExtJsRestfulService.svc/GetAlbum', create: 'http://localhost:52984/ExtJsRestfulService.svc/AddAlbum', update: 'http://localhost:52984/ExtJsRestfulService.svc/UpdateAlbum', destroy: 'http://localhost:52984/ExtJsRestfulService.svc/DeleteRecord' }, reader: { type: 'json', root: 'AlbumList', successProperty: 'success' }, writer: { type: 'json', writeAllFields: true }, afterRequest: function (request, success) { var obj = new DHT.controller.Users(); if (request.action == 'read') { obj.readCallback(request); } else if (request.action == 'create') { obj.createCallback(request); } else if (request.action == 'update') { obj.updateCallback(request); } else if (request.action == 'destroy') { obj.deleteCallback(request); } } } }); </code></pre> <p>My grid is not populating. What is it that is not properly configured. Prior to adding "results" properties the grid was working fine. I wanted to add custom paging so I added this property on my service layer. What's wrong with the code?</p>
    singulars
    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.
    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