import mx.collections.ArrayCollection;
[Bindable] private var gridArrayCollection:ArrayCollection = new ArrayCollection();
private function addGridItem(event:Event):void
{
gridArrayCollection.addItem(NameInput.text);
callLater(selectNewRow);
}
private function selectNewRow():void
{
nameGrid.selectedIndex = nameGrid.rowCount;
}