Class files and components

I was trying out the DataGrid tutorial this morning and was trying to turn it into a class file, but I can’t get the DataGrid to populate!

How does one target/populate a component, movie clip, etc. with data from a class file?

I kept getting an error; “dataGridMain is not a method”

DataGrid Tutorial:
http://www.kirupa.com/developer/flash8/datagrid.htm

thanks for any help,
hybrid