Raddocklayout.RegisteredDocks.Count() Always return 0

4 posts, 0 answers
  1. jerry
    jerry avatar
    5 posts
    Member since:
    Jun 2007

    Posted 20 Jun 2007 Link to this post

    Hi,
    I am just trying to use the new promtheus build(2007.1.615.0). I found the property of Raddocklayout.RegisteredDocks always returns me a empty collection.
    My code is as following.
    Any wrong(bug?) with it?
    Default2.aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> 
    <%@ Register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <div> 
                <asp:Label ID="lblError" runat="server" ForeColor="red" /> 
                <asp:ScriptManager ID="ScriptManager1" runat="server">  
                </asp:ScriptManager> 
                <telerik:raddocklayout id="rdl" runat="server" /> 
                <asp:Panel ID="pnlLeft" runat="server" BackColor="yellow" Width="160px"></asp:Panel> 
            </div> 
        </form> 
    </body> 
    </html> 
     
    default2.aspx.cs
    using System;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
    using Orientation=Telerik.Web.UI.Orientation;  
     
    public partial class Default2 : Page  
    {  
        protected void Page_Init(object sender, EventArgs e)  
        {  
            RadDockZone z1 = new RadDockZone();  
            z1.ID ="zone1";  
            z1.Width = Unit.Pixel(150);  
            z1.BorderStyle = BorderStyle.Solid;  
            z1.Orientation = Orientation.Horizontal;  
              
            RadDockZone z2 = new RadDockZone();  
            z2.ID = "zone2";  
            z2.Width = Unit.Pixel(150);  
            z2.BorderStyle = BorderStyle.Solid;  
            z2.Orientation = Orientation.Horizontal;  
              
            pnlLeft.Controls.Add(z1);   
            pnlLeft.Controls.Add(z2);  
        }  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            lblError.Text = rdl.RegisteredDocks.Count.ToString();  
             
        }  
    }  
     
  2. Petya
    Admin
    Petya avatar
    869 posts

    Posted 20 Jun 2007 Link to this post

    Hello,

    rdl.RegisteredDocks returns all RadDock objects registered with this RadDockLayout control. From what I saw in your code, you do not have any docks in the first place. You just create zones and you add them to a panel - no docks and layout involved here. I am attaching your page modified so that some docks are dynamically created and added to the zones, the zones are then added to the layout and in this scenario rdl.RegisteredDocks.Count will return the count of the docks. You could modify my example to fit your requirements - it is only important to remember that if you want to use rdl.RegisteredDocks.Count then the docks must be INSIDE the layout regardless whether in a zone or not. If you have additional questions, please contact us again.

    Sincerely yours,
    Petya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. jeba
    jeba avatar
    2 posts
    Member since:
    May 2007

    Posted 22 Jun 2007 Link to this post

    I used the rad window control its perfectly run in .ashx file
    coding:


        Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
            'Dim sb As New StringBuilder
            Dim h1 As New Web.UI.WebControls.LinkButton
            Dim l1 As New Label
            Dim l2 As New Label
            Dim a1 As New Telerik.WebControls.RadWindowManager
            'Dim b1 As New Telerik.WebControls.RadWindow
            Dim sw As StringWriter = New StringWriter
            Dim newpage As New Page
            Dim htmlform As New HtmlForm
            Dim p As Panel = New Panel
            Dim lbl1 As Button = New Button
            Dim offsetLeft As Integer = 0

            ''''''''''''

            Dim writer As HtmlTextWriter = New HtmlTextWriter(sw)
            context.Response.ContentType = "text/html"
            context.Response.ContentType = "image/jpeg"
            context.Response.ContentType = "image/gif"
            context.Response.ContentType = "image/png"
            context.Response.ContentType = "text/plain"


            ''''''''''''''''

            h1.ID = "btn"
            h1.Text = "Registration form"
            h1.PostBackUrl = ""
            h1.Style.Add("font-family", "Arial")
            h1.Style.Add("font-size", "11px")
            h1.Style.Add("color", "Red")
            h1.Style.Add("font-weight", "bold")
            h1.Style.Add("cursor", "hand")
            h1.CssClass = "Reportindex"
            h1.Attributes.Add("onmouseover", "window.radopen('http://sns-devsrv/syndicate-src/step_1.html');")

            ''''''''''''

            l1.ID = "l1"
            l1.Text = "RadWindow is a component that can replace the standard browser dialogs and alert/prompt/confirm boxes. Developers can build modal and non-modal dialogs and windows, " & h1.Text & " individually or in groups that mimic the behavior of the Windows taskbar."
            l2.ID = "l2"
            l2.Text = "RadWindow is a component that can replace"

            '''''''''''''

            lbl1.ID = "lbl"
            lbl1.Width = "970"
            lbl1.BackColor = Color.SkyBlue
            lbl1.Text = "Click here to view radwindow"
            lbl1.Font.Bold = True

            ''''''''''''''''

            a1.ID = "wing"
            'a1.Language = "fr-FR"
            'a1.OpenerElementId = h1.ID
            a1.Height = "350"
            a1.Behavior = Telerik.WebControls.RadWindowBehaviorFlags.Default
            a1.Page = newpage
            'a1.CssClass = "RegWizard.css"
            a1.EnableTheming = True
            a1.UseEmbeddedScripts = False
            'a1.OffsetElementId = h1.ClientID
            a1.RadControlsDir = "~/RadControls"
            'b1.SkinsPath = context.Server.MapPath("~/RadControls/Window/Skins")

            a1.Skin = "Default"


            ''a1.UseClassicWindows = True

            ''''''''''''''
            For Each b1 As Telerik.WebControls.RadWindow In a1.Windows
                b1.ID = "RadWindow1"
                b1.SkinsPath = "~/RadControls/Window/Skins"

                b1.NavigateUrl = "~step_1.html"
                b1.Modal = True
                b1.ReloadOnShow = True
                b1.RadControlsDir = "~/RadControls"
                'b1.MinimizeZoneId = "MinimizeZone"
                'b1.MinimizeMode =MinimizeZone

                'b1.InitialBehavior = Minimize
                b1.Title = ""
                a1.Windows.Add(b1)
            Next

            'a1.Top = 15
            'a1.Left = offsetLeft
            'offsetLeft += 100
            'b1.Skin = "Blue"
            'b1.UseEmbeddedScripts = False


            'p.Controls.Add(lbl1)
            'p.Controls.Add(l1)
            p.Controls.Add(h1)
            htmlform.Controls.Add(a1)
            newpage.Controls.Add(htmlform)
            p.RenderControl(writer)
            a1.RenderControl(writer)

            'context.Response.Write("document.write('<table><tr><td style=font-family:Arial;font-size:11px;color:green;> RadWindow is a component that can replace the standard browser dialogs and alert/prompt/confirm boxes. Developers can build modal  " + MakeJava(sw.ToString) + "  individually or in groups that mimic the behavior of the Windows taskbar.</td></tr></table>');")

            context.Response.Write("document.write('" + MakeJava(sw.ToString) + "');")
            'context.Response.Write("document.write('<img src=http://sns-devsrv/syndicate-src/RadControls/Window/Skins/Default/Img/close.gif  visible=false />');")

        End Sub

        ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
            Get
                Return False
            End Get
        End Property
        Public Shared Function MakeJava(ByVal strIn As String) As String
            strIn = strIn.Replace("" & Microsoft.VisualBasic.Chr(13) & "", "")
            strIn = strIn.Replace("\", "\\")
            strIn = strIn.Replace("'", "\'")
            strIn = strIn.Replace("" & Microsoft.VisualBasic.Chr(13) & "", "")
            strIn = strIn.Replace("" & Microsoft.VisualBasic.Chr(10) & "", "\n")
            strIn = strIn.Replace("" & Microsoft.VisualBasic.Chr(9) & "", "\t")
            strIn = strIn.Replace("<", "<'+'")
            Return strIn
        End Function


    I called this page in another server

      
            <script src="http://sns-devsrv/syndicate-src/Scripts/RadWindowClient.js"></script>
       
            <script src="http://sns-devsrv/syndicate-src/syndicate.ashx" ></script>


    But not called skin image

    tell me urgent

    thanks
    jebasing
  4. Petya
    Admin
    Petya avatar
    869 posts

    Posted 22 Jun 2007 Link to this post

    Hi,

    Please, as your problem is related to the product RadWindow - write your question in the forum threads for RadWindow. Also, provide some more information on what exactly the problem is - if some images are missing - which are they, etc.


    All the best,
    Petya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top