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 9145221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:27:38+00:00 2026-06-17T10:27:38+00:00

Given data in the form: var grid_data = [ {Hello: ‘World’}, {Jesus:’Navas’} ] I

  • 0

Given data in the form:

var grid_data = [ {Hello: 'World'}, {Jesus:'Navas'} ]

I wish to draw a grid like so:

enter image description here

The grid shows with 2 rows but with no data, I can’t find the problem in the following code:

    var grid_store = Ext.create('Ext.data.Store', {
    fields: [
       {name: 'Property'},
       {name: 'Value'}
    ],
    data: grid_data
});

    // create the Grid
var grid_view = Ext.create('Ext.grid.Panel', {
    store: grid_store,
    renderTo: 'info_panel',
    stateful: true,
    stateId: 'stateGrid',
    columns: [
        {
            text     : 'Property',
            width    : 100,
            sortable : true,
            dataIndex: 'Property'
        },
        {
            text     : 'Value',
            width    : 80,
            sortable : false,
            dataIndex: 'Value'
        }
          ],
    height: 350,
    width: 600,
    title: 'Array Grid',
    viewConfig: {
        stripeRows: true
    }
});

Renders to:

<div id="info_panel"></div>

If you’re wondering how I got the example image, I changed the store to an ArrayStore and re-formatted the data into arrays, but I’d prefer to miss out that step and insert the data as-is.

edit:

I think what I’m really asking for is a way to alert extjs to use the JSON keys as values, as opposed to most of the grid examples out there that take the form:

{value: 'Hello'}, {property: 'World'}
  • 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. Editorial Team
    Editorial Team
    2026-06-17T10:27:39+00:00Added an answer on June 17, 2026 at 10:27 am

    As one of the commenters and your edit suggested, your grid is built to consume a json with ‘Property’ and ‘Value’ being the keys for the json objects. I don’t know if it’s possible for you to change the source of the data to send in the reformatted json, but if not, you can always just run a quick loop to do so after receiving the data:

    var new_data = [];
    Ext.each(grid_data, function(obj) {
      for (var prop in obj) {
        new_data.push({
          Property: prop,
          Value: obj[prop]
        });
      }
    }, this);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In file data.hex, the data is given in hexadecimal form where the first digit
Given data like this C1<-c(3,-999.000,4,4,5) C2<-c(3,7,3,4,5) C3<-c(5,4,3,6,-999.000) DF<-data.frame(ID=c(A,B,C,D,E),C1=C1,C2=C2,C3=C3) How do I go about removing
Given a data set like this; +-----+---------------------+--------+ | id | date | result |
Given the following javascript: var fo = Ext.create('Ext.form.Panel', { layout:'box', ... items: [{ xtype:
Given data frame values are Group year Value A 2010 17 A 2011 18
I am trying to sample a data frame from a given data frame such
Another stupid question here regarding a SQL scenario. Given data such as: FieldKey DocumentKey
Given two data frames: C1<-c(3,4,4,4,5) C2<-c(3,7,3,4,5) C3<-c(5,6,3,7,4) DF<-data.frame(C1=C1,C2=C2,C3=C3) DF C1 C2 C3 1 3
Given a data stream of continuously arriving items containing a timestamp and text (e.g.
For any given file data size, I want to be able to resize (or

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.