Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tooltip on JQGrid
12th January, 00:58
Post: #1
Tooltip on JQGrid
Hi,
I am trying to create a tooltip on my JQGrid Cell.
Here is my JQGrid code.

jQuery(document).ready(function () {
var grid = jQuery("#RegisteredEmailServiceFeaturesList");
var selectedValue = document.getElementById('SelectedPlan').value;
grid.jqGrid({
url: 'Home/GetRegistedEmailFeatures?selectedPlan=' + selectedValue,
datatype: 'json',
mtype: 'POST',
colModel: [
{ name: 'Name', index: 'Name', width: 70, align: 'left', editable: false, title: false },
{ name: 'Image', index: 'Image', width: 20, align: 'right', editable: true, title: false },
{ name: 'feature1', index: 'feature1', width: 65, align: 'center', title: false },
{ name: 'feature2', index: 'feature2', width: 65, align: 'center', title: false },
{ name: 'feature3', index: 'feature3', width: 65, align: 'center', title: false },
{ name: 'Description', index: 'Description', hidden: true, title: false }
],
sortname: 'Name',
viewrecords: false,
rownumbers: false,
sortorder: "desc",
gridview: false,
width: '100%',
height: '100%',
loadComplete: function () {

$("#RegisteredEmailServiceFeaturesList tr").each(function () {
var col2 = $(this).find("td:eq(1)");
var thumbnail_url = "../../Content/Images/1.jpg";
$(col2).removeAttr("title");
var image = '<img src="'+thumbnail_url+'" alt="Changement Imagette...." width=200 height=200 />';
$(col2).qtip({
content: image,
position: 'leftMiddle',
hide: {
fixed:true
},
style: {
tip: true,
name: 'light'
}
});
});
}
});
$([RegisteredEmailServiceFeaturesList]).setGridWidth(570, true);
//$([RegisteredEmailServiceFeaturesList]).setGridHeight(103, true);
$('.ui-jqgrid-hdiv').hide();
});

I am able to see the image but I want to position it in a way so that when i take my mouse to column 2 i can see it right there. Instead it is showing on arround 4th or 5th column.
Please advice.

Thanks,
Vivek
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)