Get the contents of a dock using tooltips

2 posts, 0 answers
  1. John Horlock
    John Horlock avatar
    22 posts
    Member since:
    Jun 2007

    Posted 13 Jul 2007 Link to this post

    I am currently building a calendar with drag & drop capabilities and shows tooltips load on demand when you hover over an event but I have come across a problem...

    With tooltips, how can I obtain a label value from inside a Dock that is inside a DockZone by passing DockZone.ClientID?  I would do this using the Dock.ClientID, but the tooltips will not show outside of the DoneZone
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 16 Jul 2007 Link to this post

    Hello John ,

    The following code illustrates how to get the value form a label inside RadDock using JavaScript:

    <%@ Register TagPrefix="rad" 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> 
        <title>Untitled Page</title> 
        <script type="text/javascript">  
             function GetLabelText()  
             {  
                var oLabel = document.getElementById('<%=Label1.ClientID %>');           
                alert(oLabel.innerHTML);  
             }  
        </script> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <div> 
        <rad:RadDockLayout ID="RadDockLayout1" runat="server">  
            <rad:RadDockZone ID="RadDockZone1" runat="server">  
                <rad:RadDock ID="RadDock1" runat="server" Title="RadDock1">      
                    <ContentTemplate> 
                        <asp:Label ID="Label1" runat="server" Text="SomeText"/>  
                    </ContentTemplate>          
                </rad:RadDock>          
            </rad:RadDockZone> 
            <rad:RadDockZone ID="RadDockZone2" runat="server">  
            </rad:RadDockZone> 
            <input type="button" onclick="GetLabelText()" value="GetLabelText" /> 
        </rad:RadDockLayout> 
        </div> 
        </form> 
    </body> 
    </html> 

    Unfortunately I cannot understand what you want to achieve using tooltip. Please provide me with a detailed description illustrating your goals.

    Best Regards,
    Petio Petkov
    the Telerik team

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