PDA

View Full Version : [Solved]Problem w. Store count vs totalCount



rforbes
10 Dec 2007, 10:36 AM
Hi,

I'm hoping someone can help me with the following problem that I'm having with a Grid not showing all of the data returned by an Http request.

I have a Grid defined with a Store backed by an XMLReader. I am not using paging (e.g. no paging toolbar on grid, not specifying start and limit parameters in the ds.load(), not specifying totalRecords param on XMLReader) but after each load the Store count() and totalCount() methods return different numbers, e.g. 1/3 and 6/14. The grid is only showing the smaller number of items. According to the documentation, count() and totalCount() are only different when paging !?

I'm using Ext 1.0.1.

Any help would be appreciated!

Thanks,

Rob

tryanDLS
10 Dec 2007, 10:47 AM
Possibly an old bug - suggest you upgrade to 1.1.1 and retest.

rforbes
10 Dec 2007, 11:27 AM
OK, I upgraded to 1.1.1--still the same problem, in fact now the grid only shows ONE item--ds.count() is 1, and ds.totalCount() is 14 !?

Rob

tryanDLS
10 Dec 2007, 11:39 AM
Can you post the store/grid code and the xml.

rforbes
10 Dec 2007, 2:03 PM
Found the problem--my error. The XML field I was specifying for the id was not unique, which accounted for the discrepancy between totalCount (# of elements read) and count() (# of elements with unique non-null id). Sorry for the false alarm.

Rob