Hi Frind,
After a long-time work i can create the tooltip on yii admin gridview using ajax and display the data dynamic
1) Add a js in your view file
<link rel="stylesheet" type="text/css" href="http://craigsworks.com/projects/qtip2/packages/latest/jquery.qtip.min.css" />
<script type="text/javascript" src="http://craigsworks.com/projects/qtip2/packages/latest/jquery.qtip.min.js"></script>
1)apply the rel element on href admin grid view
array(
'name' => 'Ticket Status',
'type' => 'raw',
'value' => 'CHtml::link($data["view"], CHtml::normalizeUrl("javascript:void(0)"),array("id"=>"'.rand(0,999999).'","rel"=>"viewallticket?even_id={$data["id"]}&date_id= {$data["events_date_id"]}","class"=>"tool_tip"))',
'htmlOptions' => array('width' => '100px'),
),
3) create the viewallticket on your controller file.
public function actionviewalltickert(){
//code here
}
3)then put a jquery in admin grid view
<script>
$(document).ready(function()
{
toolt_tip()
});
</script>
function toolt_tip(){
$('a[.tool_tip][rel]').each(function()
{
$(this).qtip(
{
content: {
text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
ajax: {
url: $(this).attr('rel') // Use the rel attribute of each element for the url to load
},
title: {
text: 'Ticket - ' + $(this).text(), // Give the tooltip a title using each elements text
button: true
}
},
position: {
at: 'bottom center',
my: 'top center',
viewport: $(window),
effect: false
},
show: {
event: 'click',// you can change the hover or so many more...
solo: true
},
hide: 'unfocus',
style: {
classes: 'qtip-wiki qtip-light qtip-shadow'
}
})
})
.click(function(event) { event.preventDefault(); });
}
}
It’s working for me.