Hi,
I'm using Js code to clone a dockzone and append it to a div:
Then I want to save the layout using StorageProvider.
However the client-side created dockzones and the docks inside the dockzones are not saved.
I assume the client-side created dockzone cannot be handled by the code-behind's GetRegisteredDocksState ?
What is the correct method to save the client-side cloned dockzone to the database or to get the serializedState ?
Thanks.
I'm using Js code to clone a dockzone and append it to a div:
dockZone = $find(
"<%=RadDockZone_Empty.ClientID %>"
).clone();
dockZoneElement = dockZone.get_element();
$telerik.$(dockZoneElement).css(
"display"
,
"block"
);
$telerik.$(dockZoneElement).css(
"width"
,
"100%"
);
$telerik.$(dockZoneElement).css(
"min-height"
,
"155px"
);
document.getElementById(
"test"
).appendChild(dockZoneElement);
Then I want to save the layout using StorageProvider.
' save the raddocklayout
RadDockLayout1.StorageProvider.SaveStateToStorage(
"123456"
, SaveState)
Private
Function
SaveState()
As
String
Dim
dockStates
As
List(Of DockState) = RadDockLayout1.GetRegisteredDocksState()
Dim
serializer
As
New
JavaScriptSerializer()
Dim
converters
As
New
List(Of JavaScriptConverter)()
converters.Add(
New
UnitConverter())
serializer.RegisterConverters(converters)
Dim
stateString
As
String
= [
String
].Empty
For
Each
state
As
DockState
In
dockStates
Dim
ser
As
String
= serializer.Serialize(state)
stateString = stateString +
"|"
+ ser
Next
Return
stateString
End
Function
However the client-side created dockzones and the docks inside the dockzones are not saved.
I assume the client-side created dockzone cannot be handled by the code-behind's GetRegisteredDocksState ?
What is the correct method to save the client-side cloned dockzone to the database or to get the serializedState ?
Thanks.