Good day,
I have used the tooltip on my editable datagrid. The tooltip itself works, but when the tooltip is shown when i doucbleclick (to edit) then the tooltip won't disappear, not even after editting.
I need to refresh the page to get rid of the tooltip.
Any ideas?
Here's the piece of code:
function formatA(value,row,index){
return '<span data-p1='+index+' class="easyui-tooltip">' + value + '</span>';
}
function createTooltip(){
$('#tt').datagrid('getPanel').find('.easyui-tooltip').each(function(){
var index = parseInt($(this).attr('data-p1'));
$(this).tooltip({
content: $('<div></div>'),
onUpdate: function(cc){
var row = $('#tt').datagrid('getRows')[index];
var content = '<div>'+row.comments+'</div>';
cc.panel({
width:200,
content:content
});
},
position:'left'
});
});
}
And the datagrid i added these:
<th data-options="field:'comments',width:100,align:'left',sortable:true,formatter:formatA">Opmerkingen</th>
and
onLoadSuccess function calls "createTooltip()"