View Full Version : How to hide rows of a grid

16 Sep 2010, 6:28 AM
I want to hide some rows of a grid.
I can't find a function to hide. What I need is smt like:

if ( myGrid.store.data.items[0].data.filterThis ){

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.

16 Sep 2010, 6:57 AM
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

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

16 Sep 2010, 10:01 PM
Thank you very much,

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