I managed to get tool tips working using the following code.
function loadToolTips(){
$('#Employees tr').each( function(){
var tooltip = 'Employee Code : '
tooltip = tooltip + $('[abbr="EmployeeCode"]',this).text();
tooltip = tooltip + '<br />';
tooltip = tooltip + 'Name: '
tooltip = tooltip + $('[abbr="Name"]',this).text();
tooltip = tooltip + '<br />';
tooltip = tooltip + 'Department: '
tooltip = tooltip + $('[abbr="Department"]',this).text();
tooltip = tooltip + '<br />';
tooltip = tooltip + 'Section: '
tooltip = tooltip + $('[abbr="Section"]',this).text();
$("td", this).each(function() {
var $TableCell = $(this);
$TableCell.attr("title", tooltip);
$TableCell.addClass("tooltip");
});
});
$('.tooltip').tooltipster();
}
I first iterate through all of the rows in the grid and build up the tool tip by getting the values from each cell in the row by using the abbr's.
for each cell within the row I then add the title attribute with the tool tip value.
I also add a class tool tip but this is only because I am using tooltipster.
I call the loadToolTips function when the onSuccess method is called.
preProcess: somefunction,
onSuccess: loadToolTips