Is there a method like GetRadWindowManager for RadToolTipManager as shown in code snippet below?
The goal is to find the RadToolTipManager in an easy and transparent manner like in code below for RadWindowManager in any content page, otherwise one needs to get the id from master page and then use $find, which is not an easy and transparent way of getting the manager object.
var
omanager = GetRadWindowManager();
Just passing along a bug that I found with regards to tooltip positioning and IE 11 (I didn't check other versions of IE and it does not happen in Chrome or Firefox).
Details:
If your <body> element is scrollable (vis overflow: auto and a fixed width/height), once you scroll, the tooltip position will be off. The reason is buried deep with Telerik's script code.In PopupScripts.js, the _fixPositionInBounds function, called when the popup tooltip is being shown, the code calls _getViewportBounds, which is this:
getViewportBounds:function(){var e=$telerik.getClientBounds();
var f=document.documentElement;
var d=document.body;
e.scrollLeft=$telerik.isMobileSafari?window.pageXOffset:($telerik.getCorrectScrollLeft(f)||$telerik.getCorrectScrollLeft(d));
e.scrollTop=$telerik.isMobileSafari?window.pageYOffset:(f.scrollTop||d.scrollTop);
return e;
}
For IE, scrollTop for <body> will be non-0 when scrolled which causes Telerik's popup script to think the tooltip will be positioned off screen so it adjusts. Unfortunately, this adjustment puts the tooltip in the wrong place (vertically much lower than it should be).
The simple fix for me was to put a containing <div> as a child of <body> and use that <div> to scroll. After I did that all is well. It took me 2 days to figure this out, so posting this here :)
- Mike
Hi , I have a requirement to load a radgrid on Tooltip. According to i found that Documentation RadTooltip does not have onDemand property. But i found that there is a server side propery called "show". Will that help in Loading my radgrid only when i click on RadTooltip. I want to bind my radgrid only on LinkButton click.
<telerik:RadToolTip ID="RadToolTipFactory" runat="server" TargetControlID="lbRecentFactory"
RelativeTo="Element" Position="BottomLeft" RenderInPageRoot="true" EnableShadow="true"
ManualClose="true" ShowEvent="OnClick" AutoCloseDelay="20000">
<telerik:RadAjaxPanel ID="RadAjaxPanel_grdFactoryTooltip" runat="server" Height="100%"
Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadGrid ID="grdFactoryTooltip" runat="server" OnItemCommand="grdFactoryTooltip_ItemCommand"
AllowPaging="true" OnNeedDataSource="grdFactoryTooltip_NeedDataSource" PageSize="15"
<Columns>
..........
...................... </Columns>
<telerik:Radgrid>
<telerik:RadAjaxPanel>
</telerik:RadTooltip>
<asp:LinkButton ID="lbRecentFactory" runat="server" Text="Rec" Font-Underline="false"
OnClick="lbRecentFactory_Click" OnClientClick="ShowToolTipRecentCases();" ForeColor="White"></asp:LinkButton>
InCodebheind:
protected void bRecentFactory_Click(object sender, EventArgs e)
{
RadToolTipFactory.Controls.Add(RadAjaxPanel_grdFactoryTooltip);//I am adding RadAjaxpanel to Tooltip target controls here
RadToolTipFactory.show();
}
ITs not working...Or Do i have only option to use TooltipManager which is not working in my case. Please help me.
http://demos.telerik.com/aspnet-ajax/tooltip/examples/hideevent/defaultcs.aspx
"Hide on event :Default - hides when mouse is out of the target element" is not working as expected
if you leave the mouse pointer on top of the target and don't move your mouse at all, the tooltip will close after few seconds. Expected behavior would be that the tooltip stays visible until you actually move mouse out of the target element. I tested this with IE, Chrome and Firefox with similar results.
I am having an issue where RadToolTipManager does not come up in Chrome on IOS. Nothing happens when I click on a button that triggers the action for displaying the tool tip.
I have the following in my markup page:
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" ShowEvent="OnClick"
RelativeTo="BrowserWindow" Position="BottomLeft" Width="600px" Height="300px"
Animation="Resize" HideEvent="LeaveTargetAndToolTip" Skin="Default" OnAjaxUpdate="OnAjaxUpdate"
RenderInPageRoot="true" ManualClose="true" Modal="false">
</telerik:RadToolTipManager>
In code behind, I have this:
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
try
{
Control ctrl = Page.LoadControl("../UserControls/PriceBreak.ascx");
panel.ContentTemplateContainer.Controls.Add(ctrl);
...
....
}
Thank you,
Alex
I am trying to do something similar to the RadToolTip for RadCalendar demo shown here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultvb.aspx. I want to add an export button inside the UserControl for the tooltip, but can't seem to get that event to fire. My code for the user control is below. Any ideas?
Partial
Class
CalendarEventDetails
Inherits
System.Web.UI.UserControl
Private
dtSelectedDate
As
DateTime
Public
Property
SelectedDate()
As
DateTime
Get
Return
dtSelectedDate
End
Get
Set
(
ByVal
value
As
DateTime)
dtSelectedDate = value
End
Set
End
Property
Protected
Sub
Page_Init(sender
As
Object
, e
As
EventArgs)
Handles
Me
.Init
AddHandler
lvEvents.ItemCommand,
AddressOf
lvEvents_ItemCommand
End
Sub
Protected
Sub
Page_Load(sender
As
Object
, e
As
EventArgs)
Handles
Me
.Load
odsEvents.SelectParameters(
"StartDate"
).DefaultValue = SelectedDate
odsEvents.SelectParameters(
"EndDate"
).DefaultValue = SelectedDate
lvEvents.DataBind()
End
Sub
Protected
Sub
lvEvents_ItemCommand(sender
As
Object
, e
As
ListViewCommandEventArgs)
If
e.CommandName =
"Export"
Then
'Do Something
End
If
End
Sub
End
Class
<%@ Control Language="VB" AutoEventWireup="true" CodeFile="EventDetails.ascx.vb" Inherits="CalendarEventDetails" %>
<
asp:ListView
runat
=
"server"
ID
=
"lvEvents"
DataSourceID
=
"odsEvents"
>
<
LayoutTemplate
>
<
div
style
=
"max-height: 250px; overflow-y: auto"
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"itemPlaceHolder"
></
asp:PlaceHolder
>
</
div
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblStartDate"
Text='<%#Eval("StartDate")%>' Visible="false"></
asp:Label
>
<
asp:Label
runat
=
"server"
ID
=
"lblEndDate"
Text='<%#Eval("EndDate")%>' Visible="false"></
asp:Label
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Category</
b
><
br
/>
<%#Eval("Category")%>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Title</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblTitle"
Text='<%#Eval("Title")%>'></
asp:Label
>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Time</
b
><
br
/>
<%#Eval("StartDate", "{0:hh:mm tt}")%> to <%#Eval("EndDate", "{0:hh:mm tt}")%>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Location</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblLocation"
Text='<%#Eval("Location")%>'></
asp:Label
>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Description</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblDescription"
Text='<%#Eval("Description")%>'></
asp:Label
>
</
div
>
<
div
>
<
des:LinkButton
runat
=
"server"
ID
=
"btnExport"
Text
=
"Export"
CommandName
=
"Export"
></
des:LinkButton
>
</
div
>
</
ItemTemplate
>
<
ItemSeparatorTemplate
>
<
hr
/>
</
ItemSeparatorTemplate
>
</
asp:ListView
>
<
asp:ObjectDataSource
ID
=
"odsEvents"
runat
=
"server"
DataObjectTypeName
=
"CalendarEvent"
TypeName
=
"CalendarManager"
SelectMethod
=
"GetEventList"
>
<
SelectParameters
>
<
asp:Parameter
Name
=
"CalendarId"
Type
=
"Int32"
DefaultValue
=
"101"
/>
<
asp:Parameter
Name
=
"StartDate"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"EndDate"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"CategoryId"
Type
=
"Int32"
/>
</
SelectParameters
>
</
asp:ObjectDataSource
>
Hello,
We are facing an issue in Telerik RadToolTipManager . We have a Radgrid with hyperlinks on each cell. Hover on hyperlink shows a tooltip which is a placeholder that contains few links and a radcombobox. RadGrid Columns are build with ItemTemplate
When we hover over the link on the first row , the tool tip appears with correct data. When we go the second row or to another cell, the tool tip still holds the old values. The occurrence of this issue is not consistent and is random. Some times the tooltip data is shown correct for first few mouse hovers across rows or across cells on the same row. Some times , it breaks in the second tooltip. There is no pattern in which this issue occurs.
We did a lot of ressearch on Telerik forums and tried the following
1. Clearing TargetControls. We also validated that each target control in Radtooltipmanager has a unique ID.
2. Adding the tooltip controls to args.UpdatePanel in PreRender Event
3. Making the surrounding div of the tooltip placeholder runat=server and then assign an ID
We are adding the target controls in the following way:
ToolTipTargetControl control = new ToolTipTargetControl()
control.IsClientID = true
control.TargetControlID = visitLink1.ClientID;
control.Value = Convert.ToString(visit.ID)
if (this.RadToolTipManager1 != null)
{
RadToolTipManager1.TargetControls.Add(control
}
We are adding the controls to tooltip as follows:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e)
if (this.ToolTipVisit != null)
{
this.ToolTipVisit = CreateToolTip()
ToolTipUpdatePanel.ContentTemplateContainer.Controls.Add(this.ToolTipVisit)
}
}
Can you please provide us help in solving this issue. Thank you in advance.
Hello,
We are facing an issue in Telerik RadToolTipManager . We have a Radgrid with hyperlinks on each cell. Hover on hyperlink shows a tooltip which is a placeholder that contains few links and a radcombobox. RadGrid Columns are build with ItemTemplate
When we hover over the link on the first row , the tool tip appears with correct data. When we go the second row or to another cell, the tool tip still holds the old values. The occurrence of this issue is not consistent and is random. Some times the tooltip data is shown correct for first few mouse hovers across rows or across cells on the same row. Some times , it breaks in the second tooltip. There is no pattern in which this issue occurs.
We did a lot of ressearch on Telerik forums and tried the following
1. Clearing TargetControls. We also validated that each target control in Radtooltipmanager has a unique ID.
2. Adding the tooltip controls to args.UpdatePanel in PreRender Event
3. Making the surrounding div of the tooltip placeholder runat="server" and then assign an ID
We are adding the target controls in the following way:
ToolTipTargetControl control = new ToolTipTargetControl();
control.IsClientID = true;
control.TargetControlID = visitLink1.ClientID;
control.Value = Convert.ToString(visit.ID);
if (this.RadToolTipManager1 != null)
{
RadToolTipManager1.TargetControls.Add(control);
}
We are adding the controls to tooltip as follows:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (this.ToolTipVisit != null)
{
this.ToolTipVisit = CreateToolTip();
ToolTipUpdatePanel.ContentTemplateContainer.Controls.Add(this.ToolTipVisit);
}
}
Can you please provide us help in solving this issue. Thank you in advance.
What am I doing wrong?
1. I want user to hover over label
2. tool tip comes up
3. They pick 2 dates and click OK button
4. Label shows the 2 new dates
What's happening is
1. Can't get button to close the tooltip (I COULD do it in Javascript,
but then how do I also get it to execute the javascript to update the dates?
(server side code getting client-sided by the script manager)
2. The update works once ... but then the tool tip will NEVER show again ...
once I've changed the text of the label - I promise you, it will not show again.
3. Just to test that I wasn't doing something wrong ...
I wrapped the label in a div (with runat="server" and an ID,) and made thatthe target control for the
tooltip - then it worked over and over again, but if the label itself is the target,
it will only work once.
I'm a telerik newbie ... so liklely doing something wrong.
aspx.vb code is followed by aspx code:
THANKS IN AVANCE!!!
Protected Sub Button1_Click1(sender As Object, e As EventArgs) Handles Button1.Click
Dim f = from.SelectedDate.ToString("MM/dd/yyyy")
Dim t = too.SelectedDate.ToString("MM/dd/yyyy")
lblDates.Text = f & " " & t
End Sub
<
asp:Content
ID
=
"BodyContent"
runat
=
"server"
ContentPlaceHolderID
=
"MainContent"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
>
</
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
>
</
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
>
</
asp:ScriptReference
>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"AjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"lblDates"
UpdatePanelCssClass
=
""
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:Label
ID
=
"lblDates"
runat
=
"server"
Text
=
"pre text"
></
asp:Label
>
<
telerik:RadToolTip
runat
=
"server"
ID
=
"hello"
TargetControlID
=
"lbldates"
RenderInPageRoot
=
"True"
HideEvent
=
"FromCode"
HideDelay
=
"0"
AnimationDuration
=
"0"
AutoCloseDelay
=
"0"
ShowDelay
=
"0"
RelativeTo
=
"Mouse"
Sticky
=
"True"
>
from:
<
telerik:RadCalendar
ID
=
"from"
runat
=
"server"
EnableMultiSelect
=
"False"
>
</
telerik:RadCalendar
>
to:
<
telerik:RadCalendar
ID
=
"too"
runat
=
"server"
EnableMultiSelect
=
"False"
>
</
telerik:RadCalendar
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Button"
/>
</
telerik:RadToolTip
>
</
asp:Content
>
I am using RadTooltip with RadImagegallery and Radgrid in it. Its working fine on my screen. but on smaller screen it goes out of screen size! I have added 2 images below One showing complete tooltip with close option and other is going out of screen.
<
telerik:RadToolTip
ID
=
"radtooltipshowbom"
ContentScrolling
=
"Auto"
RenderInPageRoot
=
"false"
runat
=
"server"
Modal
=
"true"
HideEvent
=
"ManualClose"
Style
=
"z-index: 6990"
Position
=
"Center"
Animation
=
"Slide"
AnimationDuration
=
"700"
BackColor
=
"White"
Width
=
"1510px"
Height
=
"670px"
>
<
asp:Panel
ID
=
"Panel3"
runat
=
"server"
BackColor
=
"White"
Height
=
"670px"
Width
=
"1510px"
>
<
table
>
<
tr
>
<
td
align
=
"center"
>
<
asp:Label
ID
=
"lblfdid"
runat
=
"server"
CssClass
=
"label"
ForeColor
=
"#990000"
Text
=
""
></
asp:Label
>
<
hr
style
=
"width: 1505px"
/>
</
td
>
</
tr
>
</
table
>
<
table
>