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

radWindow tooltip style popup under grid cell

2 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Mann
Top achievements
Rank 1
John Mann asked on 04 Mar 2009, 10:16 PM
I am trying to get a small radWindow to popup under a grid cell when the mouse is over the cell. I can get this to work, but I am having trouble positioning the popup where I want it. Here is the client side code I am using.

function rgCase_onRowCreated(sender, eventArgs) {  
  var dataItem = eventArgs.get_gridDataItem();  
  dataItem._element.cells[5].onmouseover = function() {  
    var CaseID = eventArgs.getDataKeyValue("CaseID");  
    var oManager = GetRadWindowManager();  
    var oWindow = oManager.getWindowByName("rwCaseDetails");  
    oWindow.set_offsetElementID(dataItem._element.cells[5].uniqueID);  
    oManager.open("CaseDetails.aspx?CaseID=" + CaseID, "rwCaseDetails");  
  };  
  dataItem._element.cells[5].onmouseout = function() {  
    var oManager = GetRadWindowManager();  
    oManager.closeActiveWindow();  
  };  

This works somewhat, the first cell I hover over gets the popup in the correct place, but it pops up in this same place for each subsequent cell that I hover over. Here is the definition of the radWindow.

<telerik:RadWindow ID="rwCaseDetails" runat="server" Behavior="None" Behaviors="None" InitialBehavior="None" NavigateUrl="CaseDetails.aspx" ReloadOnShow="True" ShowContentDuringLoad="False" Style="display: none;" Left="-110px" Top="20px" Width="220px" Height="150px" VisibleStatusbar="False" DestroyOnClose="False" EnableViewState="False" KeepInScreenBounds="True" VisibleTitlebar="False">  
</telerik:RadWindow> 
 

Any ideas on how to get this to work, or on an aternative way to accomplish it?

Thank you,

John

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 09 Mar 2009, 01:58 PM
Hi John,

Basically, having a window in this scenario is feasible, but will require some overhead with respect to positioning the window.
A much better option would be to use a tooltip, as shown in the following example.
I hope this suggestion helps.

Regards,
Yavor
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
John Mann
Top achievements
Rank 1
answered on 23 Mar 2009, 10:07 PM

Thank you for the reply. I was called off to other projects and just returned to this problem. I have ended up using the radToolTip as suggested, but set its Text property in the ItemCreated event of the grid. Works pretty well for this application since there's not too much text for the tool tip, nor too many rows of data. I'd like to explore other ways for applications where pulling down lots of large tooltips with graphics and other content might present a performance problem.

 

John

Tags
Grid
Asked by
John Mann
Top achievements
Rank 1
Answers by
Yavor
Telerik team
John Mann
Top achievements
Rank 1
Share this question
or