For example, I have a DataGridView control with a Blue BackgroundColor property etc.., is there a way which I can transfer or pass programatically these properties to another DataGridView control?
Something like this:
dtGrid2.Property = dtGrid1.Property; // but of course, this code is not working
Thanks…
You’ll need to use reflection.
You grab a reference to each property in your source control (based on its type), then “get” its value – assigning that value to your target control.
Here’s a crude example: