Results 1 to 3 of 3

Thread: How to hide rows of a grid

  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    177

    Cool How to hide rows of a grid

    Hello,
    I want to hide some rows of a grid.
    I can't find a function to hide. What I need is smt like:
    Code:
    if ( myGrid.store.data.items[0].data.filterThis ){
    
    //myGrid.store.data.items[0].??hide(true);
    }
    Some advise would be great.
    There is a function at store like filterBy() if this can hide rows how can I use this?
    Thanks a lot.
    --Mehmet

  2. #2
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277

    Default

    If you use the filterBy method then this calls a function on each record of the store and then depending on the return value (True or False) it will/will not inlcude the record.

    Heres an example
    Code:
    thisCmp.store.filterBy(function (record, id) {
               if (record.get('ProjectType') == config.projectType)
               {
                if (!packageTypes.disjoint([record.get('Title')]))
                {
                 return true
                }
               }
               else
               {
                return false;
               }
              });

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    177

    Default

    Thank you very much,

    Record is the store's item, this worked like magic since I put all the conditions at the item.

    --
    Mehmet

Similar Threads

  1. Hide rows in grid
    By m4rgin4l in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 16 May 2012, 12:27 AM
  2. hide some rows in grid when the record.get('hide') == true
    By aj3423 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Dec 2009, 12:24 AM
  3. How hide a rows in grid
    By wertyk in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 5 Apr 2009, 10:34 PM
  4. Hide/show grid rows
    By zeroed in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Jan 2009, 2:31 AM
  5. Can I hide rows in a grid?
    By llin96 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 30 Jul 2007, 10:06 AM

Posting Permissions

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