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

Note able to set the collapse value from table

2 Answers 42 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 18 Feb 2012, 04:08 PM
Hi,

I am not able to set the collapse value when i am reading from table. I can save the collapse value. plz help me out for this issue. i tried manually but not working. in table i am storing only dock id,dockname,collapse value and zone id.my codes are below: 

   Protected Sub RadDockLayout1_LoadDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs) Handles RDLOccurrence.LoadDockLayout
        If Not Page.IsPostBack Then
            Dim stateList1 As List(Of Widget) = Me.Presenter.GetWidgetInfo() ' getting all values from table
            For Each state1 As Widget In stateList1
                 Dim state As New DockState
                e.Positions(state.UniqueName) = zoneid & zone
                e.Indices(state.UniqueName) = 0
            Next
        End If
    End Sub

Here stateList1 or state1 contains the widgetid,widgetname,zoneid and collapse value. state have only 2 properties e.Position and e.Indices, here no any properties who can handle the collapse value and same it can display.

Please provide the solution.

2 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 22 Feb 2012, 12:31 PM
Hi Rajesh,

The server-side event LoadDockLayout of RadDockLayout is used for setting the parent dock zones and indices of the RadDock controls on the page. In order to initialize their properties (including Collapsed) please use the RadDock.ApplyState method when the RadDocks are recreated dynamically on Page_Init. I would suggest checking the following resources, as they contain helpful examples and explanations of the correct approach for adding RadDock controls dynamically on the page:

Greetings,
Slav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Rajesh
Top achievements
Rank 1
answered on 24 Feb 2012, 04:20 AM
Thanks Slav, its solves my issue. its working fine now.
Tags
Dock
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Slav
Telerik team
Rajesh
Top achievements
Rank 1
Share this question
or