general question about GUI controls

hi everyone,

I have a GUI with many dataGridView that I would like to hide if the form is reset.

is there a way to detect all the grids in the form, and hide them if the form is reset? something like

foreach ($grid in $form)

{ hide it }

thank you!

Don’t know whether its possible to get all girds in one shot, but you caould have the DataGrid objects stored in an array, then iterate through each one to hide it.

Why not just use a group control, put all the grinds inside that group control, and just hide or show the group control.

If this is a WPF/Xaml form then — In the Xaml make the Visibility of the grid item to be collapsed by default, and now in code check the myObject.Title is null or not, if you are doing such things and if not null then set grid visibility to visible.