Dynamic RadDock

4 posts, 1 answers
  1. Ivan Queiroz
    Ivan Queiroz avatar
    31 posts
    Member since:
    Oct 2009

    Posted 18 Dec 2009 Link to this post

    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



  2. Gido Geek
    Gido Geek avatar
    28 posts
    Member since:
    Nov 2009

    Posted 20 Dec 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ivan Queiroz
    Ivan Queiroz avatar
    31 posts
    Member since:
    Oct 2009

    Posted 20 Dec 2009 Link to this post

    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
  5. Answer
    Gido Geek
    Gido Geek avatar
    28 posts
    Member since:
    Nov 2009

    Posted 20 Dec 2009 Link to this post

    Dear Ivan,

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

    Kind regards,
    Gido
Back to Top