This is a migrated thread and some comments may be shown as answers.

Save dynamically created Raddoc into the database

1 Answer 61 Views
Dock
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 11 Mar 2011, 09:25 PM

Hello,
I am trying to save the dynamically  created raddoc in to mssql. GetRegisteredDocksState() does not recognize the newly created raddoc.

Public Sub SaveState()
        Dim dockState As String
        Dim serializer As New Script.Serialization.JavaScriptSerializer()
        Dim stateList As List(Of DockState) = RadDockLayout1.GetRegisteredDocksState()
        Dim serializedList As New StringBuilder()
        Dim i As Integer = 0
        While i < stateList.Count
            serializedList.Append(serializer.Serialize(stateList(i)))
            serializedList.Append("|")
            i += 1
        End While
        dockState = serializedList.ToString()
....
....


 Do you have any KB article on the same ?

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 14 Mar 2011, 03:09 PM
Hello Prayag,

In order for the GetRegisteredDocksState method to return the state of all docks, each dock needs to be a child control (it doesn't need to be direct child) of the RadDockLayout. Also, the dock needs to be added before invoking the method to retrieve the state.
We have two projects in our Code Library that demonstrate how to dynamically create RadDock controls and save their state in a DataBase. Here are links:

Greetings,
Pero
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Dock
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or