Link to home
Start Free TrialLog in
Avatar of crp81
crp81

asked on

Data Grid View Coding question

Hello Experts

I can do the following:

foreach (TabPage tp in tabc__all.TabPages
   foreach (Control lbl in tp.Controls) lbl.BackColor = Color.Blue;

My question is how do I do the same with datagridviews, so something like the following:


foreach (TabPage tp in tabc__all.TabPages
   foreach (Datagridview dgv in tp.Controls) dgv.BackColor = Color.Blue;

I get an error with this code,  Just a beginning programmer so Detail code please,  Thanks

ASKER CERTIFIED SOLUTION
Avatar of strickdd
strickdd
Flag of United States of America image

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