Note that there are some explanatory texts on larger screens.

plurals
  1. POextJS grid error, JSON data is not being displayed
    primarykey
    data
    text
    <p>I've configured my store as:</p> <pre><code>var store = new Ext.data.JsonStore({ url: 'gridData.php', root: 'movies', fields: ['film_id', 'title', 'release_year', 'rating'] }); </code></pre> <p>and then defined my grid as:</p> <pre><code>var grid = new Ext.grid.GridPanel({ title:'Movies', store: store, columns: [ { header: "ID", width: 30, dataIndex: 'film_id',sortable: true, hidden:true }, { id: 'title-col', header: "Title", width: 180,dataIndex: 'title', sortable: true }, { header: "Rating", width: 75, dataIndex: 'rating',sortable: true }, { header: "Year", width: 75, dataIndex: 'release_year',sortable: true, align: 'center' } ], autoExpandColumn: 'title-col', renderTo: Ext.getBody(), width: 600, height: 300, loadMask: true }); </code></pre> <p>then I load the store:</p> <pre><code>store.load(); </code></pre> <p>I'm doing all this in <code>Ext.onReady</code> method. The data that I want to display is fetched from a php file which is of the following form:</p> <pre><code>{ "count":2, "movies":[{ "film_id":"1", "title":"ACADEMY DINOSAUR", "description":"An Epic Drama of a Feminist And a Mad Scientist who must Battle a Teacher in The Canadian Rockies", "release_year":"2006", "rating":"PG", "special_features":"Deleted Scenes,Behind the Scenes" }, { "film_id":"2", "title":"ACE GOLDFINGER", "description":"An Astounding Epistle of a Database Administrator And an Explorer who must Find a Car in Ancient China", "release_year":"2006", "rating":"G", "special_features":"Trailers,Deleted Scenes" } ] } </code></pre> <p>When the page is loaded, the grid keeps showing the loading mask and the data is never shown. Also, I get the error <code>a is undefined.</code> What am I missing?</p> <p><strong>Edit</strong></p> <p>I've found that there's some path issue when assigning URL to store but still can't resolve. My "gridData.php" file, JS file and the HTML file where the grid is being displayed, are in the same folder and I'm on "localhost/myapp". Please help!</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