View Full Version : Data Store Returns No cached record.

23 Jan 2011, 3:46 PM
Everytime I try to run the getCount() for the datastore I get Zero even though there is a record in the XML file

*****************JavaScript Extjs*********************************
Ext.onReady(function () {
var DataFields = new Ext.data.Record.create([//record for mapping data from XML File
name: "Author",
mapping: "Author"
name: "Author",
mapping: "Author"
name: "Manufacturer",
mapping: "Manufacturer"
name: "ProductGroup",
mapping: "ProductGroup"

var DataXmlReader = new Ext.data.XmlReader({ record: "Item" }, DataFields); //XML READER uses "Item" as the Record to go through in the XML file

var DataProxyAddress = new Ext.data.HttpProxy({
url: "http://localhost:47483/Responder.aspx"//Return XML stream with content Type: text/xml

var DataStoreSection = new Ext.data.Store({//Data store variable
autoLoad: true,
proxy: DataProxyAddress,
reader: DataXmlReader

alert(DataStoreSection.getCount());//Shows how many data records were retrieved. It somehow generates zero every time :(



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.IO;
using System.Web.UI.WebControls;

namespace Respond
public partial class Respond : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
HttpContext.Current.Response.ContentType = "text/xml";
TextReader tr = new StreamReader("C:\\inetpub\\wwwroot\\SampleData.xml");


<?xml version="1.0" encoding="UTF-8"?>
<Author>Sidney Sheldon</Author>
<Manufacturer>Warner Books</Manufacturer>
<Title>Are You Afraid of the Dark?</Title>