1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    36
    Vote Rating
    0
    John Holmes is on a distinguished road

      0  

    Default [Ext 2.0] Filtering Store With Exact Match

    [Ext 2.0] Filtering Store With Exact Match


    Hi all,

    i'm not able to understand why calling the filter() method of a store on a id field, return to me records that match the id partially.

    Example

    Records of the store:

    PHP Code:
    ProvinceID CountryID Name 
    ------------------------------
    1          2         AAAAAA
    2          
    2         BBBBBB
    3          
    2         CCCCCC
    4          
    10        DDDDDD
    5          
    11        EEEEEE
    6          
    21        FFFFFF
    7          
    23        GGGGGG 
    calling store.filter('CountryID', 2) the store will be popultated with all records wich have the CountryId begin with 2.

    resulting data store:

    PHP Code:
    ProvinceID CountryID Name 
    ------------------------------
    1          2         AAAAAA
    2          
    2         BBBBBB
    3          
    2         CCCCCC
    6          
    21        FFFFFF
    7          
    23        GGGGGG 

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    The doc state that a) the 2nd arg is a string or regex and b) it matches what the field starts with.

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    36
    Vote Rating
    0
    John Holmes is on a distinguished road

      0  

    Default


    Ok,

    so i have to use store.filterBy to have a exact match filtering method or in the case of two linked combo (as stated in the tutorial) use a 'beforequery' event handler to do some filter logic.

    regards
    Francesco

  4. #4
    Ext User
    Join Date
    Dec 2007
    Posts
    4
    Vote Rating
    0
    send2dd is on a distinguished road

      0  

    Default


    Quote Originally Posted by John Holmes View Post
    Ok,

    so i have to use store.filterBy to have a exact match filtering method or in the case of two linked combo (as stated in the tutorial) use a 'beforequery' event handler to do some filter logic.

    regards
    Francesco
    Hello John, do you have any example code that you can post? In my situation I have three combo boxes, Country -> State -> County

    Thanks in advance

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar