access aspx.cs page's method in gridpanel store for fetching data in extjs

MaXeL3G3ND

New Member
I am working with ExtJs 4.0.I want to access aspx.cs page method to fetch data in extjs gridpanel. I tried to find solution from following code but didn't find success.grid.js\[code\]Ext.application({ launch: function() { // Model definition and remote store (used Ext examples data) Ext.define('ForumThread', { extend: 'Ext.data.Model', fields: ['countryId', 'countryName'], idProperty: 'countryId' }); var store = Ext.create('Ext.data.Store', { pageSize: 20, model: 'ForumThread', autoLoad: true, proxy: { type: 'ajax', url: 'mindbody.reports/test.aspx/display', reader: { type: 'json', method: "GET", totalProperty: 'totalCount' } } }); // Define grid that will automatically restore its selection after store reload Ext.define('PersistantSelectionGridPanel', { extend: 'Ext.grid.Panel', }); // Create instance of previously defined persistant selection grid panel var grid = Ext.create('PersistantSelectionGridPanel', { autoscroll: true, height: 300, renderTo: Ext.getBody(), //region: 'center', store: store, multiSelect: true, // Delete this if you only need single row selection stateful: true, forceFit: true, loadMask: false, viewConfig: { stripeRows: true }, columns:[{ id: 'countryId', text: "countryId", dataIndex: 'countryId', flex: 1, sortable: false },{ text: "countryName", dataIndex: 'countryName', width: 70, align: 'right', sortable: true } ] }); }});\[/code\]test.aspx.cs\[code\]public string display(){ country obj = new country(); JavaScriptSerializer serializer = new JavaScriptSerializer(); return serializer.Serialize(obj.SelectAll()); }\[/code\]url: 'mindbody.reports/test.aspx/display' I am trying to get data from display method of test.aspx page but not getting any data n even no errors. I thing anything wrong in calling method.
 
Back
Top