Any insight would be appreciated.
Thanks
Chris
3 Answers, 1 is accepted
Dim stateList As System.Collections.Generic.List(Of Telerik.Web.UI.DockState) = rdLayout.GetRegisteredDocksState()
Dim serializedList As New System.Text.StringBuilder()
Dim i As Integer = 0
Try
While i < stateList.Count
serializedList.Append(stateList(i).ToString())
serializedList.Append(
"|")
System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
End While
then save serialized.tostring to whatever media you desire
Does anyone have a translation from this code which depends on e.positions and e.indices to something that is event independent?
Protected Sub RadDockLayout1_LoadDockLayout( _
ByVal sender As Object, ByVal e As DockLayoutEventArgs) _
Handles rdLayout.LoadDockLayout
If Not goCBCUser.PBox.PortalLayout.IsNull Then
Dim serializedList As String = goCBCUser.PBox.PortalLayout.Value
If serializedList <> Nothing Then
Dim states As String() = serializedList.Split("|"c)
Dim i As Integer = 0
While i < states.Length
Dim state As DockState = dockState.Deserialize(states(i))
e.Positions(state.UniqueName) = state.DockZoneID
e.Indices(state.UniqueName) = state.Index
System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
End While
End If
End If
End Sub
Protected Sub btnSaveLayout_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSaveLayout.Click
Dim stateList As System.Collections.Generic.List(Of Telerik.Web.UI.DockState) = rdLayout.GetRegisteredDocksState()
Dim serializedList As New System.Text.StringBuilder()
Dim i As Integer = 0
Try
While i < stateList.Count
serializedList.Append(stateList(i).ToString())
serializedList.Append(
"|")
System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
End While
''the following 2 lines are calls to our objects for saving the data
''goCBCUser.PBox.PortalLayout.Value = serializedList.ToString()
''goCBCUser.ApplyEdit(goUser,
False, goErrs)
Catch ex As Exception
LogUtil.LogInfo(
"Error: TeacherPortal::btnSaveLayout_Click", ex)
Throw ex
End Try
End Sub
Protected Sub RadDockLayout1_LoadDockLayout( _
ByVal sender As Object, ByVal e As DockLayoutEventArgs) _
Handles rdLayout.LoadDockLayout
Try
Dim serializedList As String = goCBCUser.PBox.PortalLayout.Value
If serializedList <> Nothing Then
Dim states As String() = serializedList.Split("|"c)
Dim i As Integer = 0
While i < states.Length
Dim state As DockState = DockState.Deserialize(states(i))
e.Positions(state.UniqueName) = state.DockZoneID
e.Indices(state.UniqueName) = state.Index
System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
End While
End If
Catch ex As Exception
LogUtil.LogInfo(
"Error: TeacherPortal::RadDockLayout1_LoadDockLayout", ex)
Throw ex
End Try
End Sub