Link to home
Start Free TrialLog in
Avatar of Darren Brown
Darren BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Obtaining name of datagridview in first tabpage

Hi.  I have a script which dynamically creates X number of tab pages each with a datagridview.  I won't know the tabpage or datagridview names, as these are created from data taken from SQL.  I would like to update the label for the group box on the first tabpage from a column on the first row of the corresponding datagridview.  I know the name of the tabcontrol and I can refer to the tabpage as 0, but I can't work out how I can obtain the name of the datagridview to say:

 group_box_label.text = tabcontrol.tabpage(0).datagridview.Rows(0).Cells("Column").Value.ToString. 


Avatar of gr8gonzo
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Darren Brown


Great, thanks gr8gonzo, I appreciate the advice and example.  I'll give this a go and will let you know how I get on.
Thanks again gr8gonzo, I've had a play with a custom control and should now be able to get it working.