Two additional possibilites are 1) use a ViewStack and 2) dynamically
build the DataGrid.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Melby
Sent: Tuesday, April 15, 2008 10:57 AM
To: [email protected]
Subject: Re: [flexcoders] View States Vs using the visible flag with
multiple UI components..

 

I think the choice really depends on the usage of your application. If 
the known list of state combinations is pre-determined I usually do this

type of thing using view states. 

As an example, if I have a component that has 4 grids in a VBox and the 
known states are
State 1: 1 and 2 visible, 3 and 4 invisible
State 2: 3 and 4 visible, 1 and 2 invisible
State 3: All visible
State 4: None visible

However, if I have the same grids and the user can interactively set 
which are visible and not visible I find it easier to simply set the 
visible and includeInLayout properties of the grids directly without the

use of view states.

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com <http://www.fastlanesw.com> 
http://blog.fastlanesw.com <http://blog.fastlanesw.com> 

sk_acura 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
>
>
> 

 

Reply via email to