If you want to load data from a database.. for a FlexGrid see the link in my signature, and for a ListView see the article How can I fill a ListView with values in a database? from our Database Development FAQs/Tutorials (at the top of the Database Development forum)

Other code for working with a FlexGrid can be found in this thread