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

RadToolTipManager problems with radgrid

6 Answers 229 Views
Grid
This is a migrated thread and some comments may be shown as answers.
akeem
Top achievements
Rank 1
akeem asked on 14 May 2009, 10:11 PM
I have a radgrid with paging that is totally populated by a SqlDataSource. I want to have each row of the grid show a tooltip with dynamic content on mouseover. 

Here is my rad grid:

 

<radT:RadGrid ID="table" Skin="WebBlue" GridLines="Both" AllowPaging="true"   
EnableEmbeddedSkins="false" OnPreRender="HighlightRows" PageSize="15" runat="server">  
<MasterTableView Width="100%" ClientDataKeyNames="ID,Question" ></MasterTableView>  
<PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="Change page: {4} | Displaying page {0} of {1}, questions {2} to {3} of {5}" >  
</PagerStyle>  
<ClientSettings>  
<Selecting AllowRowSelect="True" />  
<ClientEvents OnRowContextMenu="RowContextMenu" OnRowSelected="ModifyHeader" OnRowMouseOver="test" />  
</ClientSettings>  
</radT:RadGrid>  
 

 

 

 




here is how i defined the radtooltipmanager:

 

 

 

 

 

 

<radT:RadToolTipManager ID="RadToolTipManager1" runat="server" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" 
 
RelativeTo="Mouse" Position="BottomLeft" AutoTooltipify="false"   
 
Title="Question Preview" ManualClose="true" ShowEvent="OnClick">  
 
</radT:RadToolTipManager>  
 

My first problem is that I could not get it to work with individual rows here is how i added the rows in the code behind:

 

foreach (Telerik.Web.UI.GridDataItem gdi in table.Items)  
{  
RadToolTipManager1.TargetControls.Add(gdi.ClientID, true);  
}  
 

with this setup the . OnAjaxUpdate event does not fire.

I then tried just adding the whole rad grid to the tooltip manager with this:
<TargetControls><radT:ToolTipTargetControl TargetControlID="table" /></TargetControls>

The problem I had with this is that the OnAjaxUpdate event only fires and the tooltip shows after the table first does an event that causes a postback such as if I change the page index or have ClientSettings-EnablePostBackOnRowClick enabled and do a postback.

Can anyone tell me what I am doing wrong? I do not think I have the latest versions of the controls (I think I have RadControls for ASPNET AJAX Q1 2008), and will have to contact someone else apout updateing. Is this caused from a bug in the control or something I am doing wrong?

 

6 Answers, 1 is accepted

Sort by
0
akeem
Top achievements
Rank 1
answered on 16 May 2009, 02:46 PM
anyone know the answer to this problem?
0
Accepted
Iana Tsolova
Telerik team
answered on 18 May 2009, 02:55 PM
Hello akeem,

Please find attached a sample project illustrating the desired functionality. Please try it on your end and let me know if I missed something from your logic.

I hope this helps.

All the best,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
akeem
Top achievements
Rank 1
answered on 19 May 2009, 03:34 PM
That project works as I wanted it to, I modified it to be similar to what I have and it works but the only thing different which I believe is the problem is that the radgrid is updated using ajax by other controls on the page like this for example:

AjaxManager = (RadAjaxManager)this.Master.FindControl("MasterAjaxManager");  
AjaxManager.AjaxSettings.AddAjaxSetting(categorySel, table, null); 

is there a problem doing this?



Edit: I got it to work by using this instead :
Master.Ajax.AddRelationship(true, navPanel, bodyPanel);  
Master.Ajax.AddRelationship(true, bodyPanel, bodyPanel); 

not sure what the difference is though, While you are reading this, is it really bad to group all controls into a asp Panel and add the relationship as above or should i just be doing it for individual elements and what they update?


Thank you for your help you guys have a great tech support team.
0
Iana Tsolova
Telerik team
answered on 20 May 2009, 02:19 PM
Hi akeem,

In case your grid is ajaxified, you need to add ajax setting where the grid updates itself and the RadToolTipManager. For instance like below:

RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(Page);     
ajaxManager.AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1);     
ajaxManager.AjaxSettings.AddAjaxSetting(RadGrid1, RadToolTipManager1);    
 

Additionally, you can find attached modified version of the sample I sent you.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rogerick
Top achievements
Rank 1
answered on 20 May 2009, 05:48 PM
Hi,
     I have a similiar requirement with the following exception:
OnMouseOver event, on the RadGrid, I'd like to display the tool tip that contains data (descriptions) from 2 or more radcomboboxes within the edit template of my radgrid.  Example,  if radcomobox1.text = "box1" and in the next column radcombox2.text = "box2", On the onMouseOver event, I'd like to combined both the values into the RadToolTip and display the tooltip as "box1 and box2". 
    How would I go about doing this?

Thanks,
Roger
0
Iana Tsolova
Telerik team
answered on 21 May 2009, 11:05 AM
Hi Rogerick,

Indeed, you could use the samples I provided already in this thread as a base when implementing your scenario. What you need to change is the ShowEvent property of the RadToolTipManager to the desired one. Then on ItemDataBound event of the grid to pass as second parameter of the RadToolTipManager1.TargetControls.Add() method the desired string you want to be displayed in the ToolTip later.

I hope this helps.

Greetings,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
akeem
Top achievements
Rank 1
Answers by
akeem
Top achievements
Rank 1
Iana Tsolova
Telerik team
Rogerick
Top achievements
Rank 1
Share this question
or