Dynamic RadDock

3 posts, 0 answers
  1. nil
    nil avatar
    7 posts
    Member since:
    Jul 2007

    Posted 10 Jul 2007 Link to this post

    hi Every1,
                     how to create dynamic RadDock without any event of Raddock layout and Raddockzone,i used only RadDockZone and RadDockLayout in .ascx page while creating new raddock in .asccx.vb file.please give an example which uses values from Database not session
  2. Petya
    Admin
    Petya avatar
    869 posts

    Posted 10 Jul 2007 Link to this post

    Hi nil,

    We would like to ask you for a detailed explanation on your example and also the reason why you do not want to use any events of RadDockLayout and RadDockZone. Once you provide us with your requirements we will advise you on how to build your project.

    Greetings,
    Petya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. nil
    nil avatar
    7 posts
    Member since:
    Jul 2007

    Posted 10 Jul 2007 Link to this post

    Actually i converted raddocks control into promotheus controls and my .ascx code is here==>
          

    <telerik:RadDockLayout ID="dockManagerMain" runat="server" >

    <telerik:RadDockZone ID="songsDockZone" runat="server" Width="100%" MinHeight="700px"

    BackColor="Transparent">

    </telerik:RadDockZone>

    </telerik:RadDockLayout>


    and my ascx.vb file is here==>

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

    'CODEGEN: This method call is required by the Web Form Designer

    'Do not modify it using the code editor.

    InitializeComponent()

    BindSongs()

    End Sub

    #End Region

    Private m_UserID As Integer = -1

    Public Property UserID() As Integer

    Get

    If m_UserID = -1 Then

    m_UserID = SecurityMaint.Instance.CurrentUserID

    End If

    Return m_UserID

    End Get

    Set(ByVal Value As Integer)

    m_UserID = Value

    End Set

    End Property

     

    Private Sub BindSongs()

    Dim hsh As New Hashtable

    hsh.Add("@UserID", UserID)

    Dim ds As New DataSet

    Dim dv As New DataView

    Dim da As New SqlDataAdapter(myHitFactory.DataAccess.GetDataCommand("sp_MyBasket", hsh))

    da.Fill(ds)

    Dim index As Integer = 0

    For Each row As DataRow In ds.Tables(0).Rows

    Dim ctrl As BasketSong = LoadControl("../Controls/BasketSong.ascx")

    ctrl.SongData = row

    Dim dockableObject As New RadDock

    dockableObject.UniqueName = Guid.NewGuid.ToString

    dockableObject.ID = "dock" + index.ToString()

    dockableObject.ContentContainer.Controls.Clear()

    dockableObject.ContentContainer.Controls.Add(ctrl)

    dockableObject.DockMode = DockMode.Docked

    dockableObject.DockHandle = DockHandle.TitleBar

    dockableObject.EnableDrag = True

    dockableObject.Enabled = True

    dockableObject.Height = New Unit(60)

    dockableObject.Width = New Unit(100, UnitType.Percentage)

    songsDockZone.Controls.Add(dockableObject)

    dockableObject.Commands.Add(New DockCloseCommand())

    dockableObject.Commands.Add(New DockExpandCollapseCommand())

    'songsDockZone.Docks.Add(dockableObject)

    index = index + 1

    next
    end sub
    Problem==>in my .aspx page using this above usercontrols many songs appears and now i have to docking and ordering/reordering that songs (user can do this) but docking and ordering/reordering is not working
     
Back to Top