Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 165755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:58:37+00:00 2026-05-11T11:58:37+00:00

The below code uses Ext.data.Store to retrieve a JSON with table metadata (for the

  • 0

The below code uses Ext.data.Store to retrieve a JSON with table metadata (for the column headings) and the table’s data. The backend PHP script is working correctly and the Ext.data.Store contains valid records for the data – I just can’t get them to go ‘into’ the Grid itself.

The API Documentation makes it seem as if I just define a store property for Ext.grid.GridPanel and it will handle the rest.

Note: The code below is a separate from the rest of the application. We have pulled this portion out to see if we can just get a grid working, without the influence of the rest of the application.

Ext.BLANK_IMAGE_URL = 'js/ext/resources/images/default/s.gif'; Ext.onReady(function() {     var columns = [];     var fields = [];       var tabPanel = new Ext.TabPanel({         renderTo: Ext.getBody(),         activeTab: 0,         height: 700     });      var queryHeaders = Ext.data.Record.create([         {name: 'id'},         {name: 'table'},         {name: 'field'},         {name: 'title'}     ]);      var applicationStore = new Ext.data.Store({         autoLoad: true,         reader: new Ext.data.JsonReader({root: 'fields'}, queryHeaders),         url: 'http://localhost/aargh/index.php/applications/hardware',         listeners: {             'load': function() {                 console.info(applicationStore);                 applicationStore.each(function(r) {                     this_column = [];                     this_column['header'] = r.data['title'];                     this_column['dataIndex'] = r.data['id'];                     columns.push(this_column);                     this_column = []                     this_column['name'] = r.data['id'];                     fields.push(this_column);                 });                  console.info(fields);                 var queryFields = Ext.data.Record.create([fields]);                  var queryStore = new Ext.data.Store({                     autoLoad: true,                     reader: new Ext.data.JsonReader({root: 'fields'}, queryFields),                     url: 'http://localhost/aargh/index.php/query/execute/applications/hardware',                     listeners: {                         'load': function() {                             console.info(queryStore);                             tabPanel.add(new Ext.grid.GridPanel({                                 title: 'Hardware',                                 store: queryStore,                                 columns: columns,                                 autoHeight: true,                                 frame: true                             }));                             tabPanel.doLayout();                         }                     }                 });              }         }     });  }); 

As I review the applicationStore and queryStore objects in Firebug I can see the expected data results perfectly in applicationStore.data.items.#.json and queryStore.data.items.#.json (of course, replacing # with the record number).

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:58:38+00:00Added an answer on May 11, 2026 at 11:58 am

    Wow – this has been giving us trouble for three days. Turns out I was making an array within an array at var queryFields = Ext.data.Record.create([fields]);

    Changing that to: var queryFields = Ext.data.Record.create(fields); fixed the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This seems to work when using sockets: require 'socket' host… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer Ah, yes, Word and it's lovely "smart quotes" feature. Have… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer I don't think you can. Check the Apple's documentation for… May 11, 2026 at 11:47 pm

Related Questions

I have an img tag in my webapp that uses the onload handler to
The code below shows a sample that I've used recently to explain the different
The idea behind this code is that it uses an extension method to instantiate
Partial Code: My below code pulls a query from my DB and then uses

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.