PDA

View Full Version : arraystore.query problem



bobestjs
15 Mar 2011, 5:55 PM
Hello,

I have an ArrayStore that I want to query. When I run the code below TocDVa contains all the records in TocDT not the resuls of the query.

Does anyone know what I'm doing wrong?

Thanks

var TocDVa = TocDT.query (
{'property':'RootName',value:'AOIs',
'property':'Ordered',value:true});

fay
16 Mar 2011, 3:13 AM
Where did you get that parameter list from for query (http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.ArrayStore&member=query)?

From the docs:



query (http://dev.sencha.com/deploy/dev/docs/source/Store.html#method-Ext.data.Store-query)( String field, String/RegExp value, , [Boolean caseSensitive] ) : MixedCollection

Query the records by a specified property.
[B]Parameters:

field : String A field on your records
value : String/RegExp Either a string that the field should begin with, or a RegExp to test against the field.
anyMatch : Boolean (optional) True to match any part not just the beginning
caseSensitive : Boolean (optional) True for case sensitive comparison

Returns:

MixedCollection Returns an Ext.util.MixedCollection of the matched records