Hey guys,
I'm trying to design a custom control to extend a datagridview.
The customer control is basically made up of two datagridviews, one will host the extra features, the second will offer all the usual methods/events of a regular datagridview.
What i want to know is, can i automatically pass incoming method calls to the sub control and pass raised events out without manually writing the methods.
For example, i can manually add a property like so:
public bool AllowUserToOrderColumns
{
get { return dgvTable.AllowUserToOrderColumns; }
set { dgvTable.AllowUserToOrderColumns = value; }
}
So when a user sets the AllowUserToOrderColumns on my control the value is set on the childcontrol. Obviously i can do the same for events, if the child grid raises an event i can raise an event in my parent.
The problem is, there are hundreds of members that would need to be handled. Is there a way to automate it? Or am i coming at this completely the wrong way?