Forum



20:22

13/10/2010

Hi, I have an ajax tooltip that works fine outside of jqgrid. When I hover over the link it calls the javascript function which queries the database on the row id and displays the tooltip.
How do I add it to my jqgrid in every cell of a specific column so when I hover over a link it dispays the tooltip?
Here is how I currently execute it.
echo "<a href='#' name='myname' id='myname' onMouseOver='ShowTooltip($id);' >VIEW</a>";
Also how do I add my own javascript function to be executed in jqgrid or in jquery?
Thanks!
03:29

08/06/2010

What I do is include all may tooltips in the the grid as hidden columns, then in the afterInsertRow event I do this:
afterInsertRow: function(rowid){
var $ownerid = jQuery(this).getCell(rowid,'ou_name');
var $wphone = jQuery(this).getCell(rowid,'wphone');
jQuery(this).setCell(rowid, 'name', '', '',{
title: $ownerid + ' ' + $wphone
});
}
This way there is only one call to the database for data.
Regards,
Ben
21:09

13/10/2010

Thanks Ben. I have a over 1000 rows with a large amount of comments. If I include the comments in my query would this slow the "drawing" of the grid in the browser?
Also does your code popup a tool tip or are you putting the comments in a cell instead? I don't think I'd be using the afterinsertrow unless I'm missing something? On mouseover of the cell I'd like it to popup the tooltip but don't know what the code for that would be? I don't see that jqgrid has an event for that. Can I use a JQuery event and tie it into jqgrid? I use the custom theme redmond and am not sure if that or row highlighting will override it?
Most Users Ever Online: 715
Currently Online:
61 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66