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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:59:23+00:00 2026-06-09T22:59:23+00:00

How to load the data into a grid sending a cross domain request to

  • 0

How to load the data into a grid sending a cross domain request to a ws using AJAX? I am able to send the request but how I can load the data into the grid using a callback method?

Inside the contoller file:

if(searchText){
    var resultGrid = Ext.getCmp('myResultGrid');
    store.setProxy({
                            type: 'ajax',
                            // cross domain request
                            url:"http://3.xxx.xxx.77/cs/sid/"+searchText,
                            actionMethods:{read:'GET'},
                            pageParam: false, //to remove param "page"
                            startParam: false, //to remove param "start"
                            limitParam: false,
                            timeout:9000000,
                            noCache : true,
                            reader: {
                            type: 'json'
                            }
                    });


    resultGrid.store.load({
      scope: this,
      callback: function(records, operation, success) 
      {
          var totalcount= 0;
          totalcount = records.count(true);

          if(totalcount > 0)
          {
              // Load the data into grid ???

          }
          else
          {
              Ext.Msg.alert("No Records found.");   
          }
      }
    });
}

Store file: SearchResultsStore.js

     Ext.define('AM.store.SearchResultsStore', {
    extend: 'Ext.data.Store',
    model: 'AM.model.SearchModel',
    autoLoad: false
});

Model:

   Ext.define('AM.model.SearchModel', {
    extend: 'Ext.data.Model',
    fields: ['slno', 'customer']
});

json response

        [{"slno": "12454","customer": "acd"}]

Please help am stuck!!! Thanks in advance

  • 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-09T22:59:25+00:00Added an answer on June 9, 2026 at 10:59 pm

    You can’t use ajax to send requests accross domains, which is the actual problem here. You are assuming you have to do something in the load callback because you are not receiving data back in the first place, this has nothing to do with your problem and you do not need to use the callback. What you need to do is configure your store with a ‘jsonp’ proxy instead of ajax which will let you do cross domain calls:

    store.setProxy({
                                    type: 'jsonp',
                                    // cross domain request
                                    url:"http://3.xxx.xxx.77/cs/sid/"+searchText,
                                    actionMethods:{read:'GET'},
                                    pageParam: false, //to remove param "page"
                                    startParam: false, //to remove param "start"
                                    limitParam: false,
                                    timeout:9000000,
                                    noCache : true,
                                    reader: {
                                    type: 'json'
                                    }
                            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to load data into my treestore. My ajax request give me XML
I am using a GroupingStore to load data into a grid, data is loaded
I load data into my grid using a WCF service. When a user clicks
I was trying to load a data file into mysql table using LOAD DATA
I am trying to load some XML data into C++ code (classes) using gsoap.
I'm using seeds.rb to load some dummy data into my project as I develop
I am using jqGrid . I am loading the data into the grid from
I try to load data into a certain column into a table with the
I have a data-upload function that load some data into several tables and processes
I want to load the list of the groups as well as data into

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.