1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default Paging Grid / Table with filter?

    Paging Grid / Table with filter?


    I realized in a paging grid and table it only filters the page it is showing and not query a new result using the filter,

    just wondering is there a model of that set up or do that or not.

    if not most likely have to make a new textbox that when inputted will query the store for a new type of filter or something. but not sure will that affect the sort orders too.

  2. #2
    Ext User
    Join Date
    Jul 2008
    Posts
    202
    Vote Rating
    0
    eugenparaschiv is on a distinguished road

      0  

    Default


    That would essentially be a server side filter. I need this as well. Any ideas out there? Thanks.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    well I just did some extra textfields to input filters along with the sort and stuff.

  4. #4
    Ext User
    Join Date
    Jul 2008
    Posts
    202
    Vote Rating
    0
    eugenparaschiv is on a distinguished road

      0  

    Default


    And how did that solve the problem of server-side filtering?
    As I see it, if you have a large number of entries (thousands), you don't want to push them all into the client, so you display things with paging. But when you filter, you do want to filter the whole data set, not only the page being displayed. So you either filter on the server, or you push the whole thing on the client and filter there. But for a large number of entries, this is not practical. Besides, I read in an older post that server-side filtering will be available in 1.1, and now that 1.1 is out, I cannot seem to find it. Any ides on this? Thanks.

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    6
    Vote Rating
    0
    Cedric Lamalle is on a distinguished road

      0  

    Default Grid Filtering

    Grid Filtering


    To implement more easily this functionality the GXT API should be improved.
    Let's explain the main difficulties:
    1 - Extend the menu to add the filter item:
    You can't extend the menu from a plugin (ComponentPlugin) because menu in GridView is a private member and GridView doesn't provide a getter from it.
    Workaround: extend GridView and override createContextMenu, and set the GridView in the Grid after constuction.

    2 - Passing the filters as parameters with the rest of the LoadConfig (SortInfo, offset, etc.)
    There's no easy way to access the lastConfig associated with the Loader' Store.
    WorkAround A: retrieve lastConfig via JSNI (tricky but works)
    WorkAround B: subclass BasePagingLoader for instance and store the last config there.

    Do anyone has another ideas?

  6. #6
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    well the textbox for fitlering i submit it as more data where on server side i use that string as part of mysql string to do the filters.

  7. #7
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    here is my getorders class header
    Code:
        public GetOrders(PagingLoadConfig config, Integer ordertype, String username, String filtertext, Date filterstartdate, Date filterenddate){


    when i make a sql query

    Code:
                mytable.makeTable("SELECT * FROM `orders` WHERE " + wherefield + employeeid + filterstring + filterstartdatetext + filterenddatetext);

    Oh ya I coded my own sql wrapper to get results quite easily by putting them into a vector of treemaps

  8. #8
    Ext User
    Join Date
    Jun 2008
    Posts
    6
    Vote Rating
    0
    Cedric Lamalle is on a distinguished road

      0  

    Default


    @TheBuzzer: I understand that it works, but it's not very extensible because you have to declare all your parameters in your service function.

    @Me:
    I've found a way to implement it as a plugin more easily:
    1- Using HeaderContextMenu event of the Grid it's possible to add MenuItems on the headers' menu.
    2 - Using BeforeLoad Event on ListStore or Loader I can't add the parameters in the LoadConfig.

  9. #9
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    well do whatever works for u.

    I was just giving a example on how i got server side filtering to work

  10. #10
    Ext User
    Join Date
    Jul 2009
    Posts
    25
    Vote Rating
    0
    silv is on a distinguished road

      0  

    Default


    Thought I'd add 2 cents here. A paging grid with server-side filtering would be excellent.

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