1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    13
    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
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,169
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    make your own custom filter, use filterBy

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    13
    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