View Full Version : Tool Tip Position Problem

02-11-2005, 03:38 PM
Hello All,
I have a datagrid with columns as Course, Method, location etc.For simplicity consider course only. Each course has its own discription stored in database. I have to show the discription as a tooltip for corresponding course. Note:- This datagrid rendered inside a <div> tag which is having scroll bar property as 'auto'.
Now the problem is that it is not showing the tool tip at correct position if i move any of the scrollbar(<div> or browser).

html code is follows:-

<div style="OVERFLOW: auto; WIDTH: 580px; HEIGHT: 350px">
<asp:datagrid id="DGridCourse" runat="server" Width="100%" DataKeyField="CourseID">
<asp:templatecolumn HeaderText="Course Name">
<!-- This is the Content of the tool tip - style property is currently hidden and changed to 'visible' as soon as move comes over it-->
<div class="RegDescript" id='<%# DataBinder.Eval(Container.DataItem,"CourseID") %>' >
<%# DataBinder.Eval(Container.DataItem,"Description") %>
<div class="RegCourseName" onmousemove="DescriptionPos(document.getElementById('<%# DataBinder.Eval(Container.DataItem,"CourseID") %>'))"
onmouseover="openDescript(document.getElementById('<%# DataBinder.Eval(Container.DataItem,"CourseID") %>'))"
onmouseout="closeDescript(document.getElementById('<%# DataBinder.Eval(Container.DataItem,"CourseID") %>'))">
<%# DataBinder.Eval(Container.DataItem,"CourseName") %>
<asp:boundcolumn DataField="Method" HeaderText="Method"></asp:boundcolumn>


function openDescript(obj) {
obj.style.visibility = "visible";

function closeDescript(obj) {
obj.style.visibility = "hidden";

function DescriptionPos(objTip){

.RegDescript {
visibility: hidden;
border: 2px solid #688EB3;
color: #003366;
background-color: #FFFFFF;
font-size: .65em;
width: 300px;

02-11-2005, 03:53 PM
Welcome Atul.

Please don't crosspost your question: