1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    17
    Vote Rating
    0
    dgubber is on a distinguished road

      0  

    Default store.filter not correct

    store.filter not correct


    Has anyone run into this one?

    I've created a data store in a typical fashion, and use the store on a grid view. So far it's working great. Based on a tree node selection, I initiate a function and in the function I set the store filter.

    <gridname>.store.filter('ssid', sID); Where <gridname> is replace with the actual name of the grid.

    ssid and sID are of type int

    What happens is the filter works, at least to some degree. If there are entries for ssid, as an example, that are 1 and 11, and sID = 1, it displays both, as if it were filtering like

    "if ssid contains" .vs. "if ssid equals"

    Any help would be appreciated.
    Dan

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    78
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    make your own custom filter, use filterBy

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    17
    Vote Rating
    0
    dgubber is on a distinguished road

      0  

    Default RegExp

    RegExp


    Thanks for the reply - but for waht I have - I found an easier method using RegExp, ie

    sIDSelect = new RegExp("^"+sID+"$");
    <gridname>.store.filter('ssid', sIDSelect);

    the store.filter method can take RegExp for the matching string, worked great.

    Dan

Thread Participants: 1