Yeah, I thought invalidateList would clean that up for you.  Somehow,
rowInfo gets out of sync with listItems and things get messed up..

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of arpan srivastava
Sent: Thursday, June 07, 2007 9:45 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Help !!! Getting error when change RowHeight
and then Scroll Datagrid

 

Hi Alex,

       I tried to use invalidateList() but it didn't worked out, I also
tried out calling updateList() but it was also giving error when i
change the fontsize again and again. finally i registered a
upadateComplete event and wrote following and it worked. 

private function updateCompleteHandler(event:! FlexEvent):void{
    while(rowInfo.length > listItems.length){
           rowInfo.pop();
    }
}


    I don't know if this is correct or not but it is working for me.

----- Original Message ----
From: Alex Harui <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, June 7, 2007 1:20:08 AM
Subject: RE: [flexcoders] Help !!! Getting error when change RowHeight
and then Scroll Datagrid

Try calling invalidateList( ) (not invalidateDisplayLi st()) after you
change the font size

 

________________________________

From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com]
On Behalf Of arpan srivastava
Sent: Wednesday, June 06, 2007 10:07 AM
To: Flex Coders
Subject: [flexcoders] Help !!! Getting error when change RowHeight and
then Scroll Datagrid

 

Hi All,

    I have a datagrid in which rowheight depends upon the fontSize. If i
increase the fontSize rowheight increases and if i decrease the font
size rowheight decreases. but at runtime when i change the fontsize ,
and scroll the grid i get error.I observed that when rowheight changes
rowInfo is not updated like listItems.

At this time 
rowInfo = 14 
listItems = 10 

TypeError: Error #1010: A term is undefined and has no properties.
  at mx.controls. listClasses: :ListBase/ mx.controls. listClasses:
ListBase: :scrollVerticall y()[C:\dev\ flex_201_ gmc\sdk\framewor
ks\mx\controls\ listClasses\ ListBase. as:5346]
  at mx.controls: :DataGrid/ mx.controls: DataGrid: :scrollVerticall
y()[C:\dev\ flex_201_ gmc\sdk\framewor ks\mx\controls\ DataGr! id.
as:1923]
  at mx.controls. listClasses: :ListBase/ set verticalScrollPosit
ion()[C:\ dev\flex_ 201_gmc\sdk\ frameworks\ mx\controls\ listClasses\
ListBase. as:1043]
  at mx.controls: :DataGrid/ mx.controls: DataGrid: :scrollHandler(
)[C:\dev\ flex_201_ gmc\sdk\framewor ks\mx\controls\ DataGrid. as:1720]
  at flash.events: :EventDispatcher /flash.events: EventDispatcher:
:dispatchEventFu nction()
  at flash.events: :EventDispatcher /dispatchEvent( )
  at mx.core::UIComponen t/dispatchEvent( )[C:\dev\ flex_201_
gmc\sdk\framewor ks\mx\core\ UIComponent. as:8323]
  at mx.controls. scrollClasses: :ScrollBar/h! ttp://www.adobe.
com/2006/ flex/mx/internal ::dispatchScroll Event()[C: \dev\flex_
201_gmc\sdk\ frameworks\ mx\controls\ scrollClasses\ ScrollBar. as:1096
<http://www.adobe.com/2006/flex/mx/internal::dispatchScrollEvent%28%29%5
BC:%5Cdev%5Cflex_201_gmc%5Csdk%5Cframeworks%5Cmx%5Ccontrols%5CscrollClas
ses%5CScrollBar.as:1096> ]
  at mx.controls. scrollClasses: :ScrollBar/http://www.adobe. com/2006/
flex/mx/internal ::lineScroll( )[C:\dev\ flex_201_ gmc\sdk\framewor
ks\mx\controls\ scrollClasses\ ScrollBar. as:1058
<http://www.adobe.com/2006/flex/mx/internal::lineScroll%28%29%5BC:%5Cdev
%5Cflex_201_gmc%5Csdk%5Cframeworks%5Cmx%5Ccontrols%5CscrollClasses%5CScr
ollBar.as:1058> ]
  at mx.controls. scrollClasses: :ScrollBar/ mx.controls. scrollClasses:
ScrollBar: :downArrow_ buttonDownHandle r()[C:\dev\ flex_201_
gmc\sdk\framewor ks\mx\controls\ scrollClasses\ ScrollBar. as:1160]
  at flash.events: :EventDispatcher /flash.events: EventDispatcher:
:dispatchEventFu nction()
  at flash.events: :EventDispatcher /dispatchEvent( )
  at mx.core::UIComponen t/dispatchEvent( )[C:\dev\ flex_201_
gmc\sdk\fr! amewor ks\mx\core\ UIComponent. as:8323]
  at mx.controls: :Button/http://www.adobe. com/2006/ flex/mx/internal
::buttonPressed( )[C:\dev\ flex_201_ gmc\sdk\framewor ks\mx\controls\
Button.as: 1988
<http://www.adobe.com/2006/flex/mx/internal::buttonPressed%28%29%5BC:%5C
dev%5Cflex_201_gmc%5Csdk%5Cframeworks%5Cmx%5Ccontrols%5CButton.as:1988>
]
  at mx.controls: :Button/mx. controls: Button::mouseDow nHandler(
)[C:\dev\ flex_201_ gmc\sdk\framewor ks\mx\controls\ Button.as: 2234]

 

________________________________

Get the free Yahoo! toolbar
<http://us.rd.yahoo.com/evt=48226/*http:/new.toolbar.yahoo.com/toolbar/f
eatures/norton/index.php>  and rest assured with the added security of
spyware protection. 

 

 

________________________________

Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.
<http://us.rd.yahoo.com/evt=48251/*http:/smallbusiness.yahoo.com/webhost
ing/?p=PASSPORTPLUS> 

 

Reply via email to