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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:00:49+00:00 2026-05-26T17:00:49+00:00

I am trying to re-load data into the Store which is further used by

  • 0

I am trying to re-load data into the Store which is further used by a GridPanel. My code goes like:

Ext.onReady(function(){

    myData =     [
        ['document','listsk','123','','','rat'],
        ['hiiiii','himself','rest','','','lap']
    ];

    // create the data store
    store = new Ext.data.SimpleStore({
        fields: [
            {name: 'cat'},
            {name: 'desc'},
            {name: 'edcsId'},
            {name: 'transformedEDCSUrl'},
            {name: 'transformedFormatsUrl'},
            {name: 'lineNotes'}
        ]
    });
    store.loadData(myData);

    // create the Grid
    grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
           {header: "<b>Category</b>",  sortable: true, dataIndex: 'cat'},
           {header: "<b>Description or Document Title</b>", sortable: true,  dataIndex: 'desc'},
           {header: "<b>EDCS ID #</b>", sortable: true, renderer: renderEDCSUrl, dataIndex: 'edcsId'}
           {header: "<b>URLs to Formats</b>", renderer: renderFormatsUrl},
           {id: 'lineNotes', header: "<b>Line Notes</b>", sortable: true, dataIndex: 'lineNotes'}
        ],
        viewConfig: { 
            forceFit: true
        },
        autoExpandColumn: 'lineNotes',
        stripeRows: true,
        collapsible: true
    })

    reload = function refreshGrid(data){
        store.loadData(data);
    }
})

The mydata variable as seen by Firebug is:

[
    ['document','listsk','123','','','rat'],
    ['hiiiii','himself','rest','','','lap']
]

And the data variable in the javascript function refreshGrid is also same:

[
    ['document','listsk','123','','','rat'],
    ['hiiiii','himself','rest','','','lap']
]

I am invoking the function refreshGrid as follow:

function load(response) {  
    reload(response.substring(response.indexOf('myData') + 9, 
           response.indexOf('function renderABC') - 2));
}

To me it looks like a JSON parsing issue as data is coming fine from backend. Which is the best way to parse JSON string coming from backend. The behaviour with javascript invcation of store.loadData is that each character in the data variable is treated as separate row in the Grid as shown below:

ExtJS Problem

  • 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-05-26T17:00:49+00:00Added an answer on May 26, 2026 at 5:00 pm

    For all who face this problem, a quick wayout is eval function and otherwise use some library for JSON.

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

Sidebar

Related Questions

I am trying to load some XML data into C++ code (classes) using gsoap.
I was trying to load a data file into mysql table using LOAD DATA
I'm trying to load and parse json data from an external source into a
I'm trying to load a model to add dirty data to the store, but
I'm trying to load a .json file with this line: $.getJSON('engines.json',{},function(data){ alert(data); }); If
I'm trying to load data into a MySQL database using the LOAD DATA LOCAL
I'm trying to implement a function which would load a server-stored CSV file, and
I'm facing a rather strange Issue when trying to load data from an XML-Webservice.
I have a table with composite primary key. I am trying to load data
I am trying to load mysql data from my database from a html select

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.