If the datagrid and the tilelist share the same dataprovider then you can assign the datagrid to one state (say "Grid") and the tilelist to another state (say "List) then swithing states back and for with a currentState='Grid' or currentState='List" would do the trick.
Not sure about some of your MXML code tho, specifically the stuff like datagrid.directory ? You need to rethink that a bit I think.
Just concentrate on setting up your page to first display one, then assign it to a state, then work on the other and you accomplish the switch by changing states back and forth.
Note a tilelist and a datagrid are components and one does not contain the other without code that's way beyond you and me
Hope this helps
Currently i'm able to display my data in a datagrid using "file.documentsDirectory" That's works fine but my user wants to be able to switch his view from datagrid, tile view & list view.
Air has a simple way to display the users current directory in a datagrid but i can't find an simple way to display the users current directory in a tile list.
Try casting it as the appropriate datatype for the dataprovider property
thanks for your help. the solution was simple. I wrote a method that set the "directory" property of my 3 views everytime a "change event" was triggered on my filesystemtree component.