1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    18
    Vote Rating
    0
    suresh22446688 is on a distinguished road

      0  

    Default Removing filtered text programmatically?

    Removing filtered text programmatically?


    Hi,
    I am using GXT's filtered grid(http://www.sencha.com/examples-2/#filtergrid). once the filter is applied i need to remove filtered text whatever user has entered.

    Filter.jpg


    is it possible to remove "abc" text programatically without user intervention?Please help me.


    Thanks!

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
    rherwig is on a distinguished road

      0  

    Default


    Check out the following GridFilters methods:

    List<ComponentPlugin> pluginList = grid.getPlugins();
    for (ComponentPlugin plugin : pluginList) {
    if (plugin instanceof GridFilters) {
    ((GridFilters) plugin).clearFilters();
    ((GridFilters) plugin).removeFilter(filter);
    ((GridFilters) plugin).removeAll();
    }
    }

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    18
    Vote Rating
    0
    suresh22446688 is on a distinguished road

      0  

    Default


    @rherwig, Thanks for your reply. i need to remove only the text("abc" in the above screen shot) . but above logic removes entire filter. Please help me.

    Thanks!

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
    rherwig is on a distinguished road

      0  

    Default


    You'll have to get the actual Filter for that column using either:
    Filter filter = ((GridFilters) plugin).getFilter("dataIndex");
    or

    List<Filter> filterList = ((GridFilters) plugin).getFilterData();

    Once you have the actual filter just call the setValue() method with an empty String:
    filter.setValue("");

    ~r

    PS You may have to play with this a bit but I think this is the path...

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    18
    Vote Rating
    0
    suresh22446688 is on a distinguished road

      0  

    Default


    Thanks..it worked

Thread Participants: 1

Tags for this Thread

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