PDA

View Full Version : GroupingStore filter exactMatch not working



Syed Huda
15 Feb 2011, 5:21 PM
I'm trying to filter my GroupingStore, in my case on modelId.
It is returning results for both modelIds "1" and "101"


{"input_output_flag":"I","data_item_unit_name":"(MM/DD/YYYY)","data_item_group":"Date","currency_conversion_flag":"","data_item_code":"STATEMENTDATE","model_id":"1","data_item_name_eng":"Financial Statement Date","data_item_name":"Financial Statement Date","display_flag":"Y","data_item_type_code":"DATE","display_data_item_seq":2}
....
{"input_output_flag":"I","data_item_unit_name":"(Year)","data_item_group":"Date","currency_conversion_flag":"Y","data_item_code":"FINANCIAL_YEAR_DE2","model_id":"101","data_item_name_eng":"Financial Year","data_item_name":"Financial Year","display_flag":"Y","data_item_type_code":"DATE","display_data_item_seq":1}

I'm trying to filter it like this where exactMatch is the 5th parameter:

Ext.getCmp('dataitem-grid').store.filter('model_id','1',false, false, false);

But I'm getting both of the records above even though the filter value is 1 (ie. ModelId)

Could anyone please help?

Syed Huda
16 Feb 2011, 8:22 AM
Looks like filter(.... exactMatch: true) doesn't work.
So I'm using filterBy instead, where I am passing a function.

It works!