Ah,
I should have added that we are using a GroupingCollection rather 
than an ArrayCollection


--- In [email protected], Scott - FastLane <[EMAIL PROTECTED]> 
wrote:
>
> Hmmm... well, since a column resize ends up displaying the data it 
> certainly sounds like you are missing an invalidate.  A couple of 
other 
> things to try: invalidateDisplayList on the grid, or refresh() on 
the 
> ArrayCollection after you alter the data.  The following code may 
not be 
> optimal... but, it works every time regardless of whether I put 
zero 
> items into the ArrayCollection or actually have some items to put 
in 
> there.  Note: I have to do a validateNow() for my resetting of the 
> scroll position to work.  But, I don't think it is necessary 
otherwise.
> 
>             //save off the vertical scroll position
>             var vScrollPos:int = 
> this.contractElementsGrid.verticalScrollPosition;
> 
>             //put the elements from the contract into the array 
> collection        
>             var tempElements:Array = new Array();           
>             for each(var el:Element in modContract.elements)
>             {
>                tempElements.push(el);
>             }          
>             this.contractElementsAC.source = tempElements;
>            
>             //refresh the array collection now that we have given 
it a 
> new source
>             this.contractElementsAC.refresh();
> 
>             //restore the scroll position
>             this.contractElementsGrid.validateNow();
>             this.contractElementsGrid.verticalScrollPosition = 
vScrollPos;
>             this.contractElementsGrid.invalidateDisplayList
();           
> 
> 
> hth
> Scott
> 
> Scott Melby
> Founder, Fast Lane Software LLC
> http://www.fastlanesw.com
> 
> 
> 
> reflexactions wrote:
> >
> > Hmm didnt make any difference unfortunately.
> >
> > --- In [email protected] 
> > <mailto:flexcoders%40yahoogroups.com>, Scott - FastLane <smelby@>
> > wrote:
> > >
> > > Have you tried AdvancedDataGrid.invalidateList() after you set 
the
> > data?
> > >
> > > hth
> > > Scott
> > >
> > > Scott Melby
> > > Founder, Fast Lane Software LLC
> > > http://www.fastlanesw.com <http://www.fastlanesw.com>
> > >
> > >
> > >
> > > reflexactions wrote:
> > > >
> > > > I am having an issue with the ADG.
> > > >
> > > > I have it set up and I load data into it say with 1 row and it
> > > > displays fine ok...
> > > >
> > > > Then I load some data into it that is 0 length.
> > > >
> > > > The grid clears of data, again display fine ....
> > > >
> > > > Now I load some data in this time with say 1 row again.
> > > > Nothing displays!!
> > > >
> > > > Load anything you like it wont display once it has been given 
0
> > > > length data.
> > > >
> > > > Now the really really odd things, use the mouse to strecth any
> > > > column, and bingo the data displays.
> > > >
> > > > Now what I have seen is whilst the data "wont display" during 
the
> > > > updateProprties the collection property shows length 0, the
> > > > hierarchicalCollectionView gets set with the sourceModel 
which has
> > > > length 1 but still the collection/hierarchicalCollectionView 
shows
> > > > length 0 .......
> > > > Then when I stretch the column, the
> > > > collection/hierarchicalCollectionView goes to null at some 
point
> > and
> > > > then it is recreated and then when then the sourceModel is 
set it
> > > > show length 1.
> > > >
> > > > Any ideas on how to fix this?
> > > >
> > > >
> > >
> >
> >
>


Reply via email to