Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
jqgrid, adding custom tooltip onmouseover?
18/11/2010
20:22
Avatar
alohaaaron
Member
Members
Forum Posts: 11
Member Since:
13/10/2010
sp_UserOfflineSmall Offline

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!

19/11/2010
03:29
Avatar
BenRivera
Member
Members
Forum Posts: 11
Member Since:
08/06/2010
sp_UserOfflineSmall Offline

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

19/11/2010
21:09
Avatar
alohaaaron
Member
Members
Forum Posts: 11
Member Since:
13/10/2010
sp_UserOfflineSmall Offline

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?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
32 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information