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

ToolTip unspecified Error

3 Answers 58 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 28 Oct 2008, 01:50 AM

I am using a Telerik Grid Control with a custom column that has a image button that has the item command attribute set to allow the row to be selected when the image is clicked.

The tool tip on the image button works great, but does not work great and throws an "unspecified error" when the image button is clicked before tooltip appears.

I have even commented out the code in the command:

 

 

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

this.UpdateToolTip(args.Value, args.UpdatePanel);

 

}

 

private void UpdateToolTip(string ImagePath, UpdatePanel panel)

 

{

 

Control ctrl = Page.LoadControl("/ControlLibrary/FileUI/FilePopUp.ascx");

 

ControlLibrary.FileUI.

FilePopUp popUp = (ControlLibrary.FileUI.FilePopUp)ctrl;

 

popUp.theFileImagePath = ImagePath;

panel.ContentTemplateContainer.Controls.Add(popUp);

}

 

protected void FilesGrid_ItemCommand(object source, GridCommandEventArgs e)

 

{

//if (e.CommandName == "Select")
//{
// foreach (GridItem GI in FilesGrid.SelectedItems
// {
        
// GI.Selected = false;
// }
//}
}

 

protected

 

void FilesGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
if (Session["UserID"] == null)
{
Response.Redirect(
"/default.aspx");
}

if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
//To access a cell Text
if (item["Cost"].Text == "$0.00")
{
item[
"Cost"].Text = "Free";
}

 

 

ImageButton theImg = (ImageButton)item["ThumbnailCol"].FindControl("thumbnailLnk");
Literal theNumBoards = (Literal)item["BoardsCol"].FindControl("NumBoards");

 

theNumBoards.Text = thumbnailsTA.CountNumBoards(

Convert.ToInt64(theImg.ImageUrl)).ToString();

 

RadToolTipManager1.TargetControls.Add(theImg.ClientID,

"/services/GetThumbnail.ashx?ID=1&height=200&width=200&FileID=" + theImg.ImageUrl, true);

 

theImg.ImageUrl =

"/services/GetThumbnail.ashx?ID=1&width=83&height=67&FileID=" + theImg.ImageUrl;

 

 

if (item["Type"].Text == "1")
{
item[
"Type"].Text = "yes";
}
else
{
item[
"Type"].Text = "no";
}
}

 

}

 

 

<telerik:RadToolTipManager OnAjaxUpdate="OnAjaxUpdate" ID="RadToolTipManager1"
runat="server"
Animation="Resize" Skin="Web20" Width="250px" Height="250px"
OffsetY="15" ShowDelay="2000"
AutoCloseDelay="4000" style="display: none;">
</telerik:RadToolTipManager>


Rick

 

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 31 Oct 2008, 08:57 AM
Hello Richard,

I built up a sample project in order to follow the logic you have described and tested clicking the image button before the tooltip is shown but I was not able to reproduce the problem - please examine the attached demo. I assume that you might have used AJAX on your page but I cannot be sure what is your exact configuration. I also tested the demo with the 2008.2 1001 version of the controls as you have noted.

Would you please modify my test demo in order to reproduce the problem, open a new support ticket and send it to me along with detailed explanation of the problem, reproduction steps and confirmation of the used version of the Telerik.Web.UI.dll? Once I am able to reproduce the problem locally, I will do my best to help. 

Kind regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dario Zanelli
Top achievements
Rank 1
answered on 29 Jan 2010, 09:55 AM
Hi Svetlina ,
I need to add a TololTip to a GridDataItem dynamically generated.
How can I?
I wold like to do that using only C#, not in ASP.

Thanks and regards.

Dario
0
Svetlina Anati
Telerik team
answered on 03 Feb 2010, 08:36 AM
Hi Dario Zanelli,

Did you try the suggestion and did you examine our online demos? When you add the grid column dynamically you should databind it and you can add the tooltips in the Item_DataBound event as explained and shown in our online demos. It does not matter whether you dynamically create or not the column as far as you have to simply add the desired controls to the TargetControls collection.

Regards,
Svetlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
ToolTip
Asked by
Richard
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Dario Zanelli
Top achievements
Rank 1
Share this question
or