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

Dynamic RadDock

3 Answers 90 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ivan Queiroz
Top achievements
Rank 1
Ivan Queiroz asked on 18 Dec 2009, 09:23 PM
I am trying to create raddock's dynamically. The code I am using is the code from sample "Dock/ Dynamically Created Docks," sub "CreateRadDock," except that I do not want the raddock's default commands. I also do not want a postback. This is the code:

Private Function CreateRadDock() As RadDock

        Dim docksCount As Integer = CurrentDockStates.Count
        Dim dock As New RadDock()

        dock.DockMode = DockMode.Docked
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None
        dock.AutoPostBack = False
        dock.UniqueName = Guid.NewGuid().ToString()
        dock.ID = String.Format("RadDock{0}", dock.UniqueName)
        dock.Title = "Dock"
        dock.Width = Unit.Pixel(300)

        Return dock
 End Function


The problem is that, even though I have "AutoPostBack = False," it still does a post back during drag, or if I simply click on any of the dynamic RadDocks. Am I missing something?

Thanks,

Ivan



3 Answers, 1 is accepted

Sort by
0
Gido Geek
Top achievements
Rank 2
answered on 20 Dec 2009, 01:11 PM
Hey Ivan,

I'd love to help you out. I don't see anything wrong with your code. It would be helpful if you could show me also the RadDockZone and RadDocklayout code you are using.
Are you using update panels, and if so, how and where ?

One thing you could try in the mean time is the following:
dock.CommandsAutoPostBack = false

Please let me know how things go and if you need any further assistance.

Kind regards,
Gido
0
Ivan Queiroz
Top achievements
Rank 1
answered on 20 Dec 2009, 05:29 PM
Gido,

I solved the issue by adding "dock.AutoPostBack = False" and  "dock.CommandsAutoPostBack = false"  (thanks for the suggestion) to both the "CreateRackDock"   and "CreateRadDockFromState" functions.

Things seem to be OK now.

Thanks!

Ivan
0
Accepted
Gido Geek
Top achievements
Rank 2
answered on 20 Dec 2009, 06:37 PM
Dear Ivan,

I'm glad I could help.
Could you please mark my suggestion as the answer ?

Kind regards,
Gido
Tags
Dock
Asked by
Ivan Queiroz
Top achievements
Rank 1
Answers by
Gido Geek
Top achievements
Rank 2
Ivan Queiroz
Top achievements
Rank 1
Share this question
or