What are you expecting this to do:

datagrid2.selectedIndex.AutoB()"

 

AutoB() is not a method of datagrid2.selectedIndex.

 

Tracy

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Nate Hardt
Sent: Monday, September 04, 2006 3:09 PM
To: [email protected]
Subject: Re: [flexcoders] Re: AUTO DELETE ITEMS IN DATAGRID

 

Yeah if it's saying undefined method, you're going to want to make sure you are calling the right function on the right object. From the code below it looks like your DataGrid does not have an id, so try giving your datagrid an id, then call removeItemAt on the dataProvider that goes with that id. 

 

public function AutoB():void {
            if (myDataGrid.dataProvider.length >= 2)
            {
                        myDataGrid.dataProvider.removeItemAt(0);
            }
}

 

 

<mx:DataGrid id="myDataGrid" dataChange="AutoB()">

 

 

 

 

 

On Sep 4, 2006, at 11:17 AM, tonyx_788 wrote:



thanks for the help now this is what i came up with but i get this error in my datagrid component undefined method
any ideas?

private function AutoB():void{
if (_xlcdatagrid2.length >= 2)
{
this._xlcdatagrid2.removeItemAt(0);
}
}

-------------------------------------------------------
<mx:Datagrid>
 dataChange="datagrid2.selectedIndex.AutoB()"

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to