I feel totally new to this, but I have been working on it for days with no luck.
Here are my column definitions I am using. I want to have documentName as the text, and the Document image as the tooltip. But I can only get the data field of that columnto render in the tooltip code. Not the data from another column..
I can render the imagetest in a tooltip in the imagetest column at the end
{
data: "contactDocument.documentName",
"visible": false,
},
{
data: "contactDocument.imagetest2",
"visible": false,
},
{
data: "contactDocument.documentName",
render: function (data, type, row) {
var code = '<object style=" width:300px; height: auto" data="' + row.imagetest2 + '"></object><p class="#dbtooltip" data-toggle="tooltip" title=' + data + '>' + data + '</p>';
return code;
}
data: "contactDocument.imagetest2",
render: function (imagetest2) {
var master = '<span class="mytooltip tooltip-effect-1"> <span class="tooltip-item"> <object style="background:white; width:50px; height: 50px" data="' + imagetest2 + '"></object></span> <span class="tooltip-content clearfix"> <object style=" width:300px; height: auto" data="' + imagetest2 + '"></object></span> </span>'
var code = master;
return code;
}