I think if you wanted to reuse a single DataGrid and states, you would have to keep multiple Arrays representing the columns each DataGrid needed, and in your states set the columns property of the DataGrid to the appropriate Array of columns, and then set the dataProvider to the appropriate dataProvider for that grid. Could be done but might not be worth it?
Keep in mind if you're toggling the visibility property and you're in a container that isn't absolutely laid out, the grids will still take up the same amount of space, it'll just be a big empty square. You'll also need to toggle the "includeInLayout" property. I believe this could be a pretty ineffecient mechanism thought because each invalidate/update pass on your parent container would be slowed down since these objects are still on the display list but are just ignored in the layout/measurement passes? I'm more of an ActionScript junkie than an MXML guy, so assuming all the grid properties except for columns and dataProvider were the same, I'd build the grid and columns in ActionScript and then swap them out in AS based on the comboBox or whatever the user is selecting to change the view. Just my 2 cents though. On Tue, Apr 15, 2008 at 7:58 AM, sk_acura <[EMAIL PROTECTED]> wrote: > Hi All, > > I am trying to display multiple DataGrids in a Panel. > User will have the option of switching between DataGrids. > > What's the advantages of having one DataGrid with multiple states > (if that is possible).. > > I am planning to do it by defining one DataGrid ( as the Structure > of these data grids are different) for each of my views and showing > and hiding them depending on user selection. > > Could some one point out the pros & cons of each approach.. > > Thanks > Mars > > >

