[flexcoders] Re: Hiding a row in an AdvancedDataGrid
ICollectionView or a filterFuncton can work for this; if you don't want to mess with the underlying source. -TH --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > Well, you "hide" a row by removing it from the dataProvider. There is > no direct relationship between a DG row and a dataProvider item. > > Tracy > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of whatabrain > Sent: Thursday, September 04, 2008 8:36 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > How do you hide a row in an AdvancedDataGrid? I can't find any method > that lets you get a row by index or item. >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > Well, you "hide" a row by removing it from the dataProvider. There is > no direct relationship between a DG row and a dataProvider item. Or you can use a filterFunction, which doesn't remove the row, but makes it temporarily inaccessible. Not sure how well filters work on HierarchicalData. HTH; Amy
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
When I try this, the filter function isn't called for top-level items. It's called for all child nodes in the dataProvider, but not for the parent node. Any idea why this might be, or do you need a code sample? --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > ICollectionView or a filterFuncton can work for this; if you don't want > to mess with the underlying source. > > -TH > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" wrote: > > > > Well, you "hide" a row by removing it from the dataProvider. There is > > no direct relationship between a DG row and a dataProvider item. > > > > Tracy > > > > > > > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > On > > Behalf Of whatabrain > > Sent: Thursday, September 04, 2008 8:36 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't find any method > > that lets you get a row by index or item. > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
Interesting, I would think that the opposite would occur; if you're using something like: return item.myfield=="whatever";. Sure, post your filterFunction; as well as a basic idea of the collection's structure. -TH --- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote: > > When I try this, the filter function isn't called for top-level > items. It's called for all child nodes in the dataProvider, but not > for the parent node. Any idea why this might be, or do you need a > code sample? > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > ICollectionView or a filterFuncton can work for this; if you don't > want > > to mess with the underlying source. > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" wrote: > > > > > > Well, you "hide" a row by removing it from the dataProvider. > There is > > > no direct relationship between a DG row and a dataProvider item. > > > > > > Tracy > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > [mailto:[EMAIL PROTECTED] > > On > > > Behalf Of whatabrain > > > Sent: Thursday, September 04, 2008 8:36 PM > > > To: flexcoders@yahoogroups.com > > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't find any > method > > > that lets you get a row by index or item. > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
My filter function is really simple. Something along these lines: private function filterFunc(item:Object):Boolean { return item is ChildObj; } The dataProvider is an ArrayCollection containing ParentObjs. ParentObj extends ArrayCollection, and contains ChildObjs. I call ArrayCollection.addItem() to add either ParentObj or ChildObj to the tree, and both are called after the filter is defined. In fact, I call the ChildObj insert right after the ParentObj insert. Basically, I want to hide all top-level nodes in the tree, but the filter function isn't even called for those nodes. --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Interesting, I would think that the opposite would occur; if you're > using something like: return item.myfield=="whatever";. Sure, post your > filterFunction; as well as a basic idea of the collection's structure. > > -TH > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > When I try this, the filter function isn't called for top-level > > items. It's called for all child nodes in the dataProvider, but not > > for the parent node. Any idea why this might be, or do you need a > > code sample? > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > ICollectionView or a filterFuncton can work for this; if you don't > > want > > > to mess with the underlying source. > > > > > > -TH > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" wrote: > > > > > > > > Well, you "hide" a row by removing it from the dataProvider. > > There is > > > > no direct relationship between a DG row and a dataProvider item. > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > [mailto:[EMAIL PROTECTED] > > > On > > > > Behalf Of whatabrain > > > > Sent: Thursday, September 04, 2008 8:36 PM > > > > To: flexcoders@yahoogroups.com > > > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't find any > > method > > > > that lets you get a row by index or item. > > > > > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
"and both are called after the filter is defined" Are you calling ArrayCollection.refresh() after you finish adding the parent and children objects? -TH --- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote: > > My filter function is really simple. Something along these lines: > > > private function filterFunc(item:Object):Boolean > { > return item is ChildObj; > } > > The dataProvider is an ArrayCollection containing ParentObjs. > ParentObj extends ArrayCollection, and contains ChildObjs. > > I call ArrayCollection.addItem() to add either ParentObj or ChildObj > to the tree, and both are called after the filter is defined. In > fact, I call the ChildObj insert right after the ParentObj insert. > > Basically, I want to hide all top-level nodes in the tree, but the > filter function isn't even called for those nodes. > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Interesting, I would think that the opposite would occur; if you're > > using something like: return item.myfield=="whatever";. Sure, post > your > > filterFunction; as well as a basic idea of the collection's > structure. > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > When I try this, the filter function isn't called for top-level > > > items. It's called for all child nodes in the dataProvider, but > not > > > for the parent node. Any idea why this might be, or do you need a > > > code sample? > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > ICollectionView or a filterFuncton can work for this; if you > don't > > > want > > > > to mess with the underlying source. > > > > > > > > -TH > > > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" > wrote: > > > > > > > > > > Well, you "hide" a row by removing it from the dataProvider. > > > There is > > > > > no direct relationship between a DG row and a dataProvider > item. > > > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > > [mailto:[EMAIL PROTECTED] > > > > On > > > > > Behalf Of whatabrain > > > > > Sent: Thursday, September 04, 2008 8:36 PM > > > > > To: flexcoders@yahoogroups.com > > > > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't find any > > > method > > > > > that lets you get a row by index or item. > > > > > > > > > > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
No, I never call refresh(). Here's the sequence: 1) Set the filter function. 2) Add a parent object [filter function is not called] 3) Add a child object [filter function IS called] I've tried adding parents and children later on too, and the filter function is still only called for children. --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > "and both are called after the filter is defined" > > Are you calling ArrayCollection.refresh() after you finish adding the > parent and children objects? > > -TH > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > My filter function is really simple. Something along these lines: > > > > > > private function filterFunc(item:Object):Boolean > > { > > return item is ChildObj; > > } > > > > The dataProvider is an ArrayCollection containing ParentObjs. > > ParentObj extends ArrayCollection, and contains ChildObjs. > > > > I call ArrayCollection.addItem() to add either ParentObj or ChildObj > > to the tree, and both are called after the filter is defined. In > > fact, I call the ChildObj insert right after the ParentObj insert. > > > > Basically, I want to hide all top-level nodes in the tree, but the > > filter function isn't even called for those nodes. > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > Interesting, I would think that the opposite would occur; if you're > > > using something like: return item.myfield=="whatever";. Sure, post > > your > > > filterFunction; as well as a basic idea of the collection's > > structure. > > > > > > -TH > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > > > When I try this, the filter function isn't called for top- level > > > > items. It's called for all child nodes in the dataProvider, but > > not > > > > for the parent node. Any idea why this might be, or do you need a > > > > code sample? > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > > > > ICollectionView or a filterFuncton can work for this; if you > > don't > > > > want > > > > > to mess with the underlying source. > > > > > > > > > > -TH > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" > > wrote: > > > > > > > > > > > > Well, you "hide" a row by removing it from the dataProvider. > > > > There is > > > > > > no direct relationship between a DG row and a dataProvider > > item. > > > > > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > > > [mailto:[EMAIL PROTECTED] > > > > > On > > > > > > Behalf Of whatabrain > > > > > > Sent: Thursday, September 04, 2008 8:36 PM > > > > > > To: flexcoders@yahoogroups.com > > > > > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > > > > > > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't find any > > > > method > > > > > > that lets you get a row by index or item. > > > > > > > > > > > > > > > > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
Anytime that you use a filterFunction or sort on an ArrayCollection, it won't be executed until you use call the refresh method. Basically you're saying, ok filter and sort my collection now. It doesn't happen automatically. After #3, and anytime that items are added/changed/removed in the collection, execute the refresh method to re-filter/sort the collection. I'm not sure if this is going to solve your problem, because filtering the parent objects will probably take out the children as well. You may have to just create a new collection, from the original (excluding the parents), and use that as the DataProvider. But, give refresh a try first. -TH --- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote: > > No, I never call refresh(). Here's the sequence: > > 1) Set the filter function. > 2) Add a parent object [filter function is not called] > 3) Add a child object [filter function IS called] > > I've tried adding parents and children later on too, and the filter > function is still only called for children. > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > > > > "and both are called after the filter is defined" > > > > Are you calling ArrayCollection.refresh() after you finish adding > the > > parent and children objects? > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > My filter function is really simple. Something along these lines: > > > > > > > > > private function filterFunc(item:Object):Boolean > > > { > > > return item is ChildObj; > > > } > > > > > > The dataProvider is an ArrayCollection containing ParentObjs. > > > ParentObj extends ArrayCollection, and contains ChildObjs. > > > > > > I call ArrayCollection.addItem() to add either ParentObj or > ChildObj > > > to the tree, and both are called after the filter is defined. In > > > fact, I call the ChildObj insert right after the ParentObj insert. > > > > > > Basically, I want to hide all top-level nodes in the tree, but the > > > filter function isn't even called for those nodes. > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > Interesting, I would think that the opposite would occur; if > you're > > > > using something like: return item.myfield=="whatever";. Sure, > post > > > your > > > > filterFunction; as well as a basic idea of the collection's > > > structure. > > > > > > > > -TH > > > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > > > > > When I try this, the filter function isn't called for top- > level > > > > > items. It's called for all child nodes in the dataProvider, > but > > > not > > > > > for the parent node. Any idea why this might be, or do you > need a > > > > > code sample? > > > > > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > > > > > > > ICollectionView or a filterFuncton can work for this; if you > > > don't > > > > > want > > > > > > to mess with the underlying source. > > > > > > > > > > > > -TH > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" > > > wrote: > > > > > > > > > > > > > > Well, you "hide" a row by removing it from the > dataProvider. > > > > > There is > > > > > > > no direct relationship between a DG row and a dataProvider > > > item. > > > > > > > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > > > > [mailto:[EMAIL PROTECTED] > > > > > > On > > > > > > > Behalf Of whatabrain > > > > > > > Sent: Thursday, September 04, 2008 8:36 PM > > > > > > > To: flexcoders@yahoogroups.com > > > > > > > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > > > > > > > > > > > > > > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't > find any > > > > > method > > > > > > > that lets you get a row by index or item. > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
Calling refresh() did nothing. Note that if I choose to filter out all the child nodes, it works perfectly. It's only the parent nodes I can't filter, because the filter is never called for them. --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > Anytime that you use a filterFunction or sort on an ArrayCollection, > it won't be executed until you use call the refresh method. > Basically you're saying, ok filter and sort my collection now. It > doesn't happen automatically. After #3, and anytime that items are > added/changed/removed in the collection, execute the refresh method > to re-filter/sort the collection. I'm not sure if this is going to > solve your problem, because filtering the parent objects will > probably take out the children as well. You may have to just create > a new collection, from the original (excluding the parents), and use > that as the DataProvider. But, give refresh a try first. > > -TH > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > No, I never call refresh(). Here's the sequence: > > > > 1) Set the filter function. > > 2) Add a parent object [filter function is not called] > > 3) Add a child object [filter function IS called] > > > > I've tried adding parents and children later on too, and the filter > > function is still only called for children. > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > > > > > > > "and both are called after the filter is defined" > > > > > > Are you calling ArrayCollection.refresh() after you finish adding > > the > > > parent and children objects? > > > > > > -TH > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > > > My filter function is really simple. Something along these > lines: > > > > > > > > > > > > private function filterFunc(item:Object):Boolean > > > > { > > > > return item is ChildObj; > > > > } > > > > > > > > The dataProvider is an ArrayCollection containing ParentObjs. > > > > ParentObj extends ArrayCollection, and contains ChildObjs. > > > > > > > > I call ArrayCollection.addItem() to add either ParentObj or > > ChildObj > > > > to the tree, and both are called after the filter is defined. In > > > > fact, I call the ChildObj insert right after the ParentObj > insert. > > > > > > > > Basically, I want to hide all top-level nodes in the tree, but > the > > > > filter function isn't even called for those nodes. > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > > > > Interesting, I would think that the opposite would occur; if > > you're > > > > > using something like: return item.myfield=="whatever";. Sure, > > post > > > > your > > > > > filterFunction; as well as a basic idea of the collection's > > > > structure. > > > > > > > > > > -TH > > > > > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" > wrote: > > > > > > > > > > > > When I try this, the filter function isn't called for top- > > level > > > > > > items. It's called for all child nodes in the dataProvider, > > but > > > > not > > > > > > for the parent node. Any idea why this might be, or do you > > need a > > > > > > code sample? > > > > > > > > > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ > wrote: > > > > > > > > > > > > > > > > > > > > > ICollectionView or a filterFuncton can work for this; if > you > > > > don't > > > > > > want > > > > > > > to mess with the underlying source. > > > > > > > > > > > > > > -TH > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" > > > > > wrote: > > > > > > > > > > > > > > > > Well, you "hide" a row by removing it from the > > dataProvider. > > > > > > There is > > > > > > > > no direct relationship between a DG row and a > dataProvider > > > > item. > > > > > > > > > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > > > > > [mailto:[EMAIL PROTECTED] > > > > > > > On > > > > > > > > Behalf Of whatabrain > > > > > > > > Sent: Thursday, September 04, 2008 8:36 PM > > > > > > > > To: flexcoders@yahoogroups.com > > > > > > > > Subject: [flexcoders] Hiding a row in an > AdvancedDataGrid > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > How do you hide a row in an AdvancedDataGrid? I can't > > find any > > > > > > method > > > > > > > > that lets you get a row by index or item. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
You know that the filterFunction is being called because you have a breakpoint and trace insde it and are running in debug mode right? Also, is the filterFunction on the correct ArrayCollection (the main one and not the extended one)? The correct order would be: 1.) Add parent object to main ArrayCollection 2.) Add children objects to the parent ArrayCollection 3.) Repeat 1 & 2 for all parents and children 4.) Set filterFunction for main ArrayCollection 5.) Execute refresh() on main ArrayCollection That's about all that I have; without poking through the code. -TH --- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote: > > Calling refresh() did nothing. > > Note that if I choose to filter out all the child nodes, it works > perfectly. It's only the parent nodes I can't filter, because the > filter is never called for them. > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > Anytime that you use a filterFunction or sort on an > ArrayCollection, > > it won't be executed until you use call the refresh method. > > Basically you're saying, ok filter and sort my collection now. It > > doesn't happen automatically. After #3, and anytime that items are > > added/changed/removed in the collection, execute the refresh method > > to re-filter/sort the collection. I'm not sure if this is going to > > solve your problem, because filtering the parent objects will > > probably take out the children as well. You may have to just > create > > a new collection, from the original (excluding the parents), and > use > > that as the DataProvider. But, give refresh a try first. > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > No, I never call refresh(). Here's the sequence: > > > > > > 1) Set the filter function. > > > 2) Add a parent object [filter function is not called] > > > 3) Add a child object [filter function IS called] > > > > > > I've tried adding parents and children later on too, and the > filter > > > function is still only called for children. > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > > > > > > > > > > "and both are called after the filter is defined" > > > > > > > > Are you calling ArrayCollection.refresh() after you finish > adding > > > the > > > > parent and children objects? > > > > > > > > -TH > > > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > > > > > > > My filter function is really simple. Something along these > > lines: > > > > > > > > > > > > > > > private function filterFunc(item:Object):Boolean > > > > > { > > > > > return item is ChildObj; > > > > > } > > > > > > > > > > The dataProvider is an ArrayCollection containing ParentObjs. > > > > > ParentObj extends ArrayCollection, and contains ChildObjs. > > > > > > > > > > I call ArrayCollection.addItem() to add either ParentObj or > > > ChildObj > > > > > to the tree, and both are called after the filter is defined. > In > > > > > fact, I call the ChildObj insert right after the ParentObj > > insert. > > > > > > > > > > Basically, I want to hide all top-level nodes in the tree, > but > > the > > > > > filter function isn't even called for those nodes. > > > > > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > > > > > > > > > > > > > Interesting, I would think that the opposite would occur; > if > > > you're > > > > > > using something like: return item.myfield=="whatever";. > Sure, > > > post > > > > > your > > > > > > filterFunction; as well as a basic idea of the collection's > > > > > structure. > > > > > > > > > > > > -TH > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "whatabrain" > > wrote: > > > > > > > > > > > > > > When I try this, the filter function isn't called for top- > > > level > > > > > > > items. It's called for all child nodes in the > dataProvider, > > > but > > > > > not > > > > > > > for the parent node. Any idea why this might be, or do > you > > > need a > > > > > > > code sample? > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > ICollectionView or a filterFuncton can work for this; > if > > you > > > > > don't > > > > > > > want > > > > > > > > to mess with the underlying source. > > > > > > > > > > > > > > > > -TH > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" > > > > > > > wrote: > > > > > > > > > > > > > > > > > > Well, you "hide" a row by removing it from the > > > dataProvider. > > > > > > > There is > > > > > > > > > no direct relationship between a DG row and a > > dataProvider > > > > > item. > > > > > > > > > > > > > > > > > > Tracy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > > > > > > > [mailto:[EMAIL PROTECTED] > > > >
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
--- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote: > > Calling refresh() did nothing. > > Note that if I choose to filter out all the child nodes, it works > perfectly. It's only the parent nodes I can't filter, because the > filter is never called for them. HierarchicalCollectionView has a showRoot property that you could probably use to turn the parent nodes off. I've cast HierarchcialData to HierarchicalCollectionView in the past for other reasons ( http://flexdiary.blogspot.com/2008/07/musings-on-advanceddatagrid-part- 5_03.html ), but I am not sure if this would work for you if you're not using HierarchicalCollectionView already. If you're using a GroupingCollection, it could also potentially be cast in that way. HTH; Amy
[flexcoders] Re: Hiding a row in an AdvancedDataGrid
It turns out that filtering out the parent node hides all the children too, so I guess this isn't what I want after all. --- In flexcoders@yahoogroups.com, "Amy" <[EMAIL PROTECTED]> wrote: > > --- In flexcoders@yahoogroups.com, "whatabrain" wrote: > > > > Calling refresh() did nothing. > > > > Note that if I choose to filter out all the child nodes, it works > > perfectly. It's only the parent nodes I can't filter, because the > > filter is never called for them. > > HierarchicalCollectionView has a showRoot property that you could > probably use to turn the parent nodes off. I've cast HierarchcialData > to HierarchicalCollectionView in the past for other reasons ( > http://flexdiary.blogspot.com/2008/07/musings-on-advanceddatagrid- part- > 5_03.html ), but I am not sure if this would work for you if you're not > using HierarchicalCollectionView already. If you're using a > GroupingCollection, it could also potentially be cast in that way. > > HTH; > > Amy >
RE: [flexcoders] Re: Hiding a row in an AdvancedDataGrid
Doh! Filter, yes. I mostly do e4x, filters don't come instantly to my mind. Thanks, Tim! Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff Sent: Thursday, September 04, 2008 10:59 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Hiding a row in an AdvancedDataGrid ICollectionView or a filterFuncton can work for this; if you don't want to mess with the underlying source. -TH --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > Well, you "hide" a row by removing it from the dataProvider. There is > no direct relationship between a DG row and a dataProvider item. > > Tracy > > > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of whatabrain > Sent: Thursday, September 04, 2008 8:36 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Hiding a row in an AdvancedDataGrid > > > > How do you hide a row in an AdvancedDataGrid? I can't find any method > that lets you get a row by index or item. >