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://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