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