I have reviewed the example on how to remove a dynamically created splitbar here
. I am trying to remove a RadPane and RadSplitBar from a RadSplitter on collapse.
First, during the OnClientCollapsed event I make an ajaxRequest to force a postback on the page. Then, during SaveDockLayout I perform validation on my controls and remove those controls which need to be removed.
RadSplitter splitter = splitBarToRemove.Splitter;
I do this inside of SaveDockLayout -- which causes an exception to be thrown later on. Presumably, this exception is being caused by the fact that I am modifying the view state (?) during a period in which it should not be modified.
By using the line "splitter.Items.Remove(splitBarToRemove)" I get the message
off over in a Telerik.Web.UI.WebResource -- the one for the RadSplitter, presumably.
Anyway, I remove the code that brings the dynamically created SplitBar back -- so I'm not adding a new SplitBar to the RadSplitter. I've tried just disabling the control. The code doesn't know that the RadSplitBar should be removed until after the ajaxRequest has finished processing as SaveDockLayout needs to fire and an AjaxRequest is necessary to make the postback happen.
Uncaught TypeError: Cannot call method