Results 1 to 3 of 3

Thread: store.filter not correct

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    17
    Vote Rating
    0
      0  

    Default 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 User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    86
      0  

    Default

    make your own custom filter, use filterBy

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    17
    Vote Rating
    0
      0  

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •