I'm creating a custom control for a group of peers and I'm running into a road block. The purpose of the control is to provide an easy way to implement grids with nesting, sorting, etc.
To create the nesting, I have a child GridView that serves as a blueprint for the rest of the children. I allow the developer to configure it how they want and then the custom control makes a number of identical copies.
My problem here is that I can't perfectly copy the child grids. MemberWiseClone() doesn't seem to work and GridView isn't serializable.
My current solution is to manually copy over a list of fields that I know we'll need (ID, CssClass, etc) but that's clearly inadequate and doesn't even touch EventHandlers.
Is there a good way to deep copy a GridView --or-- provide the functionality I've described using another method?