views:

503

answers:

1

I have created a windows form with two groupbox (GB1 and GB2). GB2 is set to BringToFront and Hide. GB2 have Datagridview dgv docked in panel. GB1 has a button which invoke GB2 groupbox and fill 5 datagridview rows to perform 5 operations. But is not visible during runtime. It display all columns and rows after all 5 operations were done. I want to show the user each row. I have tried below code but it did not work.

GB1.Visible = false;
GB1.Hide();
panel.BringToFront();
GB2.BringToFront();
GB2.Visible = true;
panel.Select();
panel.Focus();
GB2.Select();
GB2.Show();
dgv.Refresh();
dgv.Select();
dgv.Focus();

Please help me.

A: 

Please rephrase your question. It does not seems clear enough to reply.

danish