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

[Solved] Get the contents of a dock using tooltips

1 Answer 94 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Shane_A2Z
Top achievements
Rank 1
Shane_A2Z asked on 12 Jul 2007, 10:50 AM
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

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 16 Jul 2007, 08:15 AM

Hello Shane,


The following code illustrates how to get the value from 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.



Greetings,
Petio Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Shane_A2Z
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or