Whenever i try to clear the dock objets from the layout it clears them but it through a page cannot be null error. The code i am using for the button click is below. the rest of the page code is identical to the dynamic docks code from the cfm help file.
int pos=0;
RadDock d;
while( RadDockLayout1.Controls.Count > pos)
{
d = RadDockLayout1.Controls[pos] as RadDock;
if (d != null)
{
RadDockLayout1.Controls.Remove(d);
lblOutput.Text += "Removing Part<br />";
}
else pos++;
}