-
15 Jul 2010 6:02 PM #1
Creating a JSON Store using ASP
Creating a JSON Store using ASP
Hi,
I'm wanting to perform a simple test to create a JSON store by having ASP generate the code .. i have generated the ASP code but do not know how to implement this.
In the code below, i have generated the text in Red as ASP - how do i embed this information ?
Is there a simpler way of creating a JSON store ?
Code:var dsExclusions = new Ext.data.JsonStore({ fields: [ 'id' ], data: [ { id: 'Department' }, { id: 'Category' }, { id: 'Product' }] });
-
16 Jul 2010 3:29 AM #2
hehe .. I've found a solution thanks to a quick read; the solution I've found is below:
The ASP query will create the following output that can be used by the JSON Store;Code:var dsExclusions = new Ext.data.JsonStore({ fields : ['id'], url : 'http://localhost:9090/include/qryExclusions.asp', totalProperty : 'totalCount', root : 'records', autoLoad : true, remoteSort : true });
- The url points to the aps script that generates the code
- totalProperty get the totalCount value which can be used for pagination
- root point to the records field in the generated code
Code:({ totalCount : '999999', records : [ { id: 'Department' }, { id: 'Category' }, { id: 'Product' } ] })
Similar Threads
-
Change Store Proxy URL without Creating New Store
By rkdeiss in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 13 Apr 2010, 11:16 AM -
Issue with JSON Data Store in ASP
By Adamw in forum Ext 3.x: Help & DiscussionReplies: 5Last Post: 2 Mar 2010, 8:02 AM -
Second json store is created under each returned json Store.data.item
By daddyschmack in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 19 Aug 2009, 4:34 AM -
ASP.NET JSON
By wayne_o in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 22 Oct 2008, 6:27 AM -
JSON from ASP
By djfiii in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 5 Mar 2008, 4:18 AM


Reply With Quote