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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:12:45+00:00 2026-05-31T17:12:45+00:00

One of ASP.NET’s security features is proving to be a mountain to scale here

  • 0

One of ASP.NET’s security features is proving to be a mountain to scale here – the “d” property addition when returning a JSON response appears to be confusing ExtJS when I attempt to reconfigure a gridpanel dynamically, causing it to fail when attempting to generate new column structure.

I followed this solution by nicholasnet:
http://www.sencha.com/forum/showthread.php?179861-Dynamic-grid-columns-store-fields

and it works beautifully, until the JSON payload is wrapped around the “d” property, e.g.

{"d":{
    "metaData": {
        "root": "data",
        "fields": [{
            "type": "int",
            "name": "id",
            "hidden": true,
            "header": "id",
            "groupable": false,
            "dataIndex": "id"
        }, ...omitted for brevity...]
    },
    "success": true,
    "data": [{
        "id": "1",
        "controller": "Permissions",
        "description": "Allow to see permission by roles",
        "administrator": true,
        "marketing": false
    }]
  }  
}

I can’t work out how to tell ExtJS to skirt around this problem. I’ve tried setting the “root” property of the AJAX reader to "d.data" but that results in the grid showing the correct number of rows but no data at all.

I’ve all the property descriptors required for column metadata ("name", "header", "dataIndex") in the JSON so I don’t believe the JSON structure to be the cause. My main lead at the moment is that on the event handler:

    store.on
({
    'load' :
    {
         fn: function(store, records, success, operation, eOpts)
        {
            grid.reconfigure(store,store.proxy.reader.fields);
        },
        scope: this
   }
},  this);  

The fields in historyStore.proxy.reader.fields part is undefined when I pass the “d”-wrapped JSON. Anyone have any ideas on why this is or how to solve this issue?

edit: my Store/proxy

Ext.define('pr.store.Store-History', {
    extend: 'Ext.data.Store',
    model: 'pr.model.Model-History',
    proxy: {

        type: 'ajax',
        url: '/data/history.json',
        reader: {
            type: 'json',
            root: 'd'
        }
}
});
  • 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-31T17:12:46+00:00Added an answer on May 31, 2026 at 5:12 pm
    Ext.define('pr.store.Store-History', {
        extend: 'Ext.data.Store',
        model: 'pr.model.Model-History',
        proxy: {
    
            type: 'ajax',
            url: '/data/history.json',
            reader: {
                type: 'json',
                root: 'data',
                readRecords: function(data) {
                    //this has to be before the call to super because we use the meta data in the superclass readRecords
                   var rootNode = this.getRoot(data);
                   if (rootNode.metaData) {
                       this.onMetaChange(rootNode.metaData);   // data used to update fields
                   }
    
                  /**
                   * @deprecated will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
                   * @property {Object} jsonData
                   */
                  this.jsonData = rootNode;
                  return this.callParent([rootNode]);    // data used to get root element and then get data from it
              },
            }
        }
    });
    

    Update:
    you are not getting fields in reader because the default code for getting fields from data doesn’t handle your wrapped data, so you need to change ‘readRecords’ function to handle your custom data

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

Sidebar

Related Questions

I have one doubt here , I have one asp.net MVC web application and
I want to transfer one asp.net page form values to another page when i
I have migrated one ASP.NET v4.0 application to a new server running under a
I developed one asp.net application then copy this application and put on another machine
I am passing an object from one asp.net page to another. I'm encoding the
Is it possible to clear the output cache of one asp.net web application from
I am planning to rebuilding the code of one asp.net project to another asp.net
I'm using MVC 1.0 and have created a RequireSSLAttribute (like the one in ASP.NET
In one of the ASP .Net site we are currently working we have a
I'm converting one of our ASP.NET MVC application from 1.0 to 2.0. This is

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.