Datagrid question

Hey all,
I am looking to create some sort of Flash application that will allow a user to input a few different items in text fields and have it be displayed in the datagrid tool. I found a tutorial for it on the Kirupa website but it didnt explain anything about any type of user input. So I was just wondering if you could create the textboxes then create a button to update the datagrid.

This is the AS i found for inputing data into the data grid:

[FONT=Courier New]dataGridName.addItem(column1: Data5, column2: Data4);[/FONT]

[FONT=Courier New][FONT=Verdana]So if you put this code as the on(Release) function for a button if it would update the grid. Also If you keep entering different things then would the code just copy over the old data that was already entered?[/FONT][/FONT]

Thanks,
J&T