1. #1
    Sencha User
    Join Date
    Dec 2012
    Vote Rating
    andresdavidortiz is on a distinguished road


    Default Dinamic Filters

    Dinamic Filters

    I have an application that is a simple reports page. I'm using a Store with JsonP to fill my grid panel and for sending to the customized filters (since i don't want the ones which come with sencha gridpanel, not because they are useless but because i want my own filters) The thing is i want to build filters on a panel next to my gridpanel according to the data received via JsonP.

    For example, the report is a bunch of employees' records with columns [code,name,nationality,age,genre]
    but in my jsonP I received only nationality and genre. So my target is to create dinamically those filters by adding controls to my filters panel (empty at the begining) with button controls representing for each filter.

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Vote Rating
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice



    I think you could probably listen for the result from the store load. In that listener, prepare a list of columns from the data received (you could even add a property in your result that is just a list of columns to make it easier...).

    Once you have the list of columns for which you want filters, simply loop over them and create new filter controls and add them to the panel.

    Here's a quick example I threw together with shows, theoretically, how you could fit the pieces together. Note: this is not a 100% fit for your needs, since I'm faking the load event...but maybe the concept will work for your needs.


Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi