The grid appears to be empty with no data displayed

 var storeConfig = new Ext.data.JsonStore({
                root:           'details',
                fields: ['a1','a2','a3','a4','a5','a6','a7'],
                pruneModifiedRecords:true,
                autoload:       false
         });


         var gridDetailConfig = new Ext.grid.Panel({
             title: 'Details',
             store: storeConfig,
             width : '100%',
             header: {
               titleAlign: 'center'
             },
             columns: [
                    { text: 'col1',  dataIndex: 'a1' },
                    { text: 'col2', dataIndex: 'a2'},
                    { text: 'col3', dataIndex: 'a3' },
                    { text: 'col4', dataIndex: 'a4' },
                    { text: 'col5', dataIndex: 'a5' },
                    { text: 'col6', dataIndex: 'a6' },
                    { text: 'col7', dataIndex: 'a7' },

                ],               
         }); 

This is the setup for my data store and grid. Data is loaded through an ajax request;

var fetchData = function (param1, param2, param3){
            gridDetailConfig.mask('Loading'); 
             Ext.Ajax.request({                  
               url : '../project/getInfo.ajax',
               params :{
                   s1: param1,
                   s2: param2,
                   s3: param3
               },
               callback: function(options, success, response){

                        if(success){
                         var responseData = Ext.decode(response.responseText);
                            gridDetailConfig.unmask();

//some other codes not related grid

                            storeConfig.loadData(responseData,false);
                        } else {
                            gridDetailConfig.unmask();
                            Alert(responseData.msj);
                        }
                 }

           });

The JSON returned is as follows ;

{"success":true,"first":[{...},],"details":[{"a1":"d1","a2":"d2",..."a7":"d7"}]}

Despite everything appearing to be in order, nothing is displayed on the grid, without any errors being returned. The loading mask shows and then disappears, but no data is visible on the grid.

I'm struggling to identify the issue. Can anyone provide assistance?

Answer №1

Looks promising to me. Perhaps there is a problem with the data structure.

Try adding listeners to your store to monitor what type of records the store is receiving.

listeners:{
     load: function( instance, items, settings ) {
        console.log(items);
     }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using Google Script Code in Sheet to input a key and click on the submission button

Is there a way to enable using the Enter key in addition to clicking the submit button to input data and save it to a cell? I'm having trouble getting my current code to work. Any suggestions on how to modify it? <script> var itemBox = document ...

Leveraging Javascript within MVC3, either on a master page or child page

I'm currently developing a web application utilizing MVC3 and I am curious about the best practices for incorporating JavaScript. Specifically, I am uncertain about whether to include JavaScript in the master page as well as in individual child pages. ...

Refreshing page in Node.js with Express and EJS

I am attempting to automatically refresh the browser page when there are changes in the underlying data model: var request = require('request'); var express = require('express'); var app = express(); var bodyParser = require('body ...

Updated the application.js file by removing a function following a layout change

I'm currently working on a project using Rails version 6.0.3.1. In this app, the layout changes are dependent on the method being called, as shown in the code snippet below: def index @groups = Group.all render layout: 'application' end ...

Combine API calls using promises

The functionality of a plugin I'm using is currently not functioning as expected, leading me to merge two separate requests. Below is the code I am utilizing: Although I am able to receive a response, I am facing difficulties in checking for response ...

Guide to retrieving data from a URL and storing it in a string variable with JavaScript

Attempting to retrieve the JSON data from a specific URL and store it in a variable. The code snippet below successfully loads the JSON into a div element: $("#siteloader").html('<object data="MYURL">'); However, the goal is to extract t ...

What is the process for retrieving the JSON element?

@Override protected void onPostExecute(String response) { String firstName = null; String lastName = null; try { JSONObject jsonResponse = new JSONObject(response); JSONArray jsonArray = jsonResponse.getJ ...

Is converting a Java bean into a cookie a questionable practice?

At the organization I am employed at, a heated discussion arose regarding the following situation. Scene: There is a plain old Java object (POJO) with 6 properties, all of which are of type String. These values need to be saved as cookies so they can be ...

How can you prevent a tag from firing in Google Tag Manager by identifying a particular script included in the HTML code

Seeking advice on modifying our Google Tag Manager container as I am a novice when it comes to GTM. Encountering an issue with IE8 on pages utilizing Fusion Charts resulting in a javascript error in gtm.js. Upon investigation, it appears to be related to a ...

What is the best way to display a chosen item in a text input field?

https://i.stack.imgur.com/Qe5Ds.png Looking to create a similar design, but lacking the necessary expertise. What steps should I take or what is the specific term for this style? Seeking assistance in implementing this using jQuery, PHP, or JavaScript. A ...

I am experiencing an issue where Discord.js is unable to assign a role to a new member upon joining my server

I'm trying to set up my bot to automatically assign a specific role to new members when they join the server. However, I keep encountering a strange error that I can't seem to figure out. Here is the code snippet in question: const { GuildMember ...

SQL inputs with information that updates automatically / autofill SQL input boxes

Is it feasible to create a webpage that can connect to an SQL database, retrieve information from a table, and display it in a text box based on the input provided in another text box? Essentially, I am looking for a way to enable autofill functionality. I ...

Navigating the world of updating problems with Express.js

Currently, I am working on a MEAN stack project and facing challenges with the routing for updating. Saving operations are functioning correctly. In my Angular controller, I have defined the following scope method in which staff represents the object subm ...

Activation of Primefaces ajax event contextMenu triggers the display of the default browser right-click menu

My <p:dataTable> is straightforward, displaying person data that users can add or remove. However, I am struggling with setting the selection value. Let me illustrate my issue. Here is the structure of my p:dataTable along with the accompanying p:co ...

Complete the form submission process and retrieve data programmatically through the integration of HTML, JQuery,

I'm in need of some assistance with this issue. On my homepage, I have three divs: #Header, #Content, and #Footer. All other pages open inside the #Content div. One of these pages contains a form with two select lists and a submit button. My goal is t ...

Implementing MVC3's Razor syntax with Ajax.ActionLink and not requiring a closing tag

I am trying to display a significant amount of content within an ajax action link but need it to be between the <a ...> and </a> tags. Is there a way to render an ajax action link without closing the </a> tag? Here is an example scenari ...

hiding html elements by using the display property set to none instead of physically removing

I am currently utilizing an if-else statement to display different HTML structures. As a result, the entire HTML is being rendered twice. Is there a way we can utilize 'display: none' instead? I attempted to use it in th ...

The issue with ajax in CodeIgniter is that it keeps displaying a false message, even though the value is present

Trying to validate the existence of a value in the CodeIgniter website's database using AJAX. Below is the code snippet: <input id="username" name="pincode" type="text" class="form-control" placeholder="Enter Pincode"> <input id="prodid" n ...

When attempting to render a React child, it is important to note that objects are not valid (found: [object Promise]). If your intention was to display a collection of children, it is advised

Instructions in "/pages/blog/index.js" : import BlogComponents from "../../components/Blog/blogComponents"; import { listBlogs } from "../../server/mongodb"; const index = async (props) => { console.log(props) return ( ...

Is it possible to request a GET on a server's JSON file using a specific key?

I am currently working on a project involving an auto-suggestion exercise using a JSON file located on a server. I'm not entirely clear on the web development terminology, so one requirement has me a bit confused: The requirement states: "On the keyu ...