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

RadToolTip Manager does not work with FF

4 Answers 132 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Bren
Top achievements
Rank 1
Bren asked on 11 Nov 2008, 10:50 PM
I have a grid template column, which is an icon, and on mouseover should show the picture as a tooltip. It works fine with IE, but with FireFox, it sometimes shows the tooltip for top two rows, and for the rest it does not. The grid has paging, and when you come back to the first page, it does not show tooltips at all, for which it was showing before. Its the second column in the grid. I am attaching only that part of the code which deals with the RadToolTipManager

version : RadControls for ASP.NET AJAX Q1 2008


ASPX Code :

<

telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" RelativeTo="Element" Animation="None" OnAjaxUpdate="OnAjaxUpdate" AutoCloseDelay="2000" HideDelay="0" ShowCallout="false" Position="MiddleRight" ShowDelay="0" ContentScrolling="Auto" ShowEvent="OnMouseOver" Visible="true" Style="display: none;">

 

 

</telerik:RadToolTipManager>

 

<

telerik:RadGrid ID="RadGridMain" runat="server" AllowPaging="True" AutoGenerateColumns="False" OnItemEvent="RadGridMain_ItemEvent" OnNeedDataSource="RadGridMain_NeedDataSource" OnItemDataBound="RadGridMain_ItemDataBound">

 

 

 

 

<MasterTableView>

 

 

 

 

<RowIndicatorColumn Visible="False">

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

<ExpandCollapseColumn Resizable="False" Visible="False">

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridTemplateColumn UniqueName="Detail">

 

 

 

 

<ItemTemplate>

 

 

 

 

<sis:WebButton ID="WebButtonDetail" runat="server" ImageUrl="~/App_Themes/LBL/wbtnDetail_small.gif" IsSmallButton="true" UseCssHover="true" AutoTipKey="Detail" OnCommand="WebButtonDetail_OnCommand" CommandArgument='<%# Eval("StudentDBN") %>' />

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Photo" UniqueName="Photo">

 

 

 

 

<ItemTemplate>

 

 

 

 

<sis:WebButton ID="WebButtonCamera" runat="server" ImageUrl="~/App_Themes/LBL/wbtnCamera.gif" UseCssHover="true" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>



C# Code :

 

protected

void Page_Load( object sender, EventArgs e ) {

 

 

 

 

if

( Page.IsPostBack == false ) {

 

 

this.RadToolTipManager1.TargetControls.Clear();

 

 

}

 

protected

void RadGridMain_ItemDataBound( object sender, GridItemEventArgs e ) {

 

 

 

 

if

( e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item ) {

 

WebButton

photoBtn = e.Item.Cells[3].FindControlRecursive<WebButton>();

 

 

 

 

if

(photoBtn != null){

 

photoBtn.Visible = btnVisible;

 

if (btnVisible)

 

{

photoBtn.ID = sum.StudentDBN +

".jpg";

 

 

this.RadToolTipManager1.TargetControls.Add(photoBtn.ClientID, true);
} } }

 

 


 

 

protected

void OnAjaxUpdate( object sender, ToolTipUpdateEventArgs args ) {

 

 

int start = args.TargetControlID.LastIndexOf( "_" );

 

 

string im = args.TargetControlID.Substring( start + 1 );

 

 

Image image = new Image();

 

image.ImageUrl = im;

image.ImageUrl =

"Images/GetImage.ashx?s=" + im;

 

 

if ( image.Height.Value > 200 ) {

 

image.Height = 200;

}

args.UpdatePanel.ContentTemplateContainer.Controls.Add( image );

 

int index = args.TargetControlID.LastIndexOf( "_" );

 

 

string elementID = args.TargetControlID.Substring( index + 1 );

 

 

this.UpdateToolTip( elementID, args.UpdatePanel );

 

}

 

private void UpdateToolTip( string elementID, UpdatePanel panel ) {

 

 

Control ctrl = Page.LoadControl( "Controls/StudentPhotoPopup.ascx" );

 

panel.ContentTemplateContainer.Controls.Add( ctrl );

 

//

 

 

 

 

 

}

 


Thanks,

Brenda

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 12 Nov 2008, 03:16 PM
Hello Bren,

I already answered your other thread and for your convenience I pasted my reply below:


Your code seems to be correct and I am not able to locate the problem only looking at the provided code snippet. I am also not aware of such problem and it was not reported so far. Would you please try to reproduce the problem in this online demo which seems to be similar to your scenario or any other demo you think it can be reproduced? If you succeed, please, send me a detailed description of the reproduction instruction and I will follow them to recreate and examine the issue locally.

In case the issue cannot be observed in our demos, please prepare a simple, fully runnable project (including DB, if needed, e.g Northwind), open a new support ticket and send it to me along with detailed reproduction instructions, screenshots and a video capture, if possible. Once I am able to analyze the problem locally I will do my best to help in resolving the problem.


Kind regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Aditya
Top achievements
Rank 1
answered on 30 Jan 2012, 06:35 AM
Hi.,
I have come across similar issue. I'm showing a tooltip on hover of labels in grid column. The functionality is working perfectly in IE & Chrome.., but not in Firefox . Below is the code which i have implemented

   function RowMouseOver(sender, eventArgs) {
                var dataItem = $get(eventArgs.get_id());
                var UserName = "";
                var hdnUserName = document.getElementById("<%= hdnUserName.ClientID %>");
                for (var i = 0; i < dataItem.cells.length; i++) {
                    dataItem.cells[i].title = dataItem.cells[i].innerText;
                    UserName = dataItem.cells[i].title;
                }
                hdnUserName.value = UserName;
            }
on debugging the above JS.., I found out that "dataItem.cells[i].innerText" is undefined..,But i'm able to get this value in IE & Chrome



 private void UpdateToolTip(string elementID, UpdatePanel panel)
            {
                Control ctrl = Page.LoadControl("~/UserControls/UserDetailsForAdminMessage.ascx");
                panel.ContentTemplateContainer.Controls.Add(ctrl);
                UserControls_UserDetailsForAdminMessage details = (UserControls_UserDetailsForAdminMessage)ctrl;
                Literal lblFName = ((Literal)(details.FindControl("lblFName")));
                Literal lblLName = ((Literal)(details.FindControl("lblLName")));
                Literal lblCity = ((Literal)(details.FindControl("lblCity")));
                Literal lblEmailId = ((Literal)(details.FindControl("lblEmailId")));
                if (hdnUserName.Value != null)
                {
                    List<usp_SelectUsersResult> lst = new TemplateDomain().SelectRetailerDetails(hdnUserName.Value, "/MenUs.Web");
                    lblFName.Text = lst[0].ContactFirstName;
                    lblLName.Text = lst[0].ContactLastName;
                    lblEmailId.Text = lst[0].CompanyEmail;
                    lblCity.Text = lst[0].City;
                }
            }
}

Please provide solution.

Regards.,
 Aditya
0
Marin Bratanov
Telerik team
answered on 31 Jan 2012, 02:49 PM
Hi Aditya,

It seems that the tooltip's content is not rendered properly because of the first error that is thrown on your page when you try to access the values from the grid. I suggest you examine this demo to see how to obtain them via JavaScript. It can be applied for the OnRowMouseOver event as well since it also exposes the dataitem.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Aditya
Top achievements
Rank 1
answered on 02 Feb 2012, 10:24 AM
Hi Marin,
I have resolved this issue using JQuery.

Regards,

Aditya
Tags
ToolTip
Asked by
Bren
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Aditya
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or