Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Hide grid rows depending on record value (getRowClass occupied)

  1. #1
    Sencha User
    Join Date
    Aug 2008
    Location
    Gothenburg
    Posts
    157

    Default Hide grid rows depending on record value (getRowClass occupied)

    Hi! I need to hide rows depending on a records value. The grid is using the RowExpander plugin which is already overriding the getRowClass method.
    And I don't wont to remove the records from the store.

    Some other way to do this? A beforerowinserted (not: beforerowsinserted) event that could return false to skip inserting the row to the grid would be convenient...

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Store.filter or Store.filterBy?

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Location
    Gothenburg
    Posts
    157

    Default

    But this will remove the records from the store, and I don't want that.

    I have x amount of rows in the grid. The user should be able to select rows and replace these with one "parent" row. The replaced rows (children) is still going to be saved to the db, but with a parent_id attached to them (the new replacing row).

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    No, it just filters them. You can clearFilters

  5. #5
    Sencha User
    Join Date
    Aug 2008
    Location
    Gothenburg
    Posts
    157

    Default

    Ah, thats perfect. I just call clearFilters before sending to server.

    ...but, how do I match null values with regExp?

  6. #6
    Sencha User
    Join Date
    Aug 2008
    Location
    Gothenburg
    Posts
    157

    Default

    *bumb*
    I need to filter out all records with parent_id set to null.
    RegExp != my favourite...

  7. #7
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Use filterBy() instead of filter().

  8. #8

    Default

    I have a grid with few records which are coming from server. Each record has few HTML elements(some text boxes with id in <DIV> tag). I use document.getElementById() to get the value present in those tex boxes. I am using the store's filter() to hide the rows. When I use clearFilter to get hidden rows back, document.getElementById() returns null for those rows.
    Please let me know if I am missing anything there.


    TIA

  9. #9
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You can only query the id after the rows have been rendered (the gridview normally defers row render by 50ms after clearFilter modifies the store).

    Try setting deferRowRender:false in the gridpanel config.

  10. #10

    Default

    I have a popup that shows all the records with checkbox in grid. After selection of some of these i want to show those selected records in another list. This list is using same store.
    If i use store.filter() then it filter my all components those are using same store. And clearfilter() make available all records in popup again but the selected records list also populated with entire data.

    In this case what is the alternate to show/hide rows of grid?

Page 1 of 2 12 LastLast

Posting Permissions

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