开发者

jQGrid with jquery tooltip tools

I am using this tooltip that is jQuery based on a web page that has a jQGrid element in it. The tooltip works fine for all the non jQgrid elements from the page. I am trying to apply the tooltip to the columns of the grid to show specific data returned from the ajax call with no succes. The tooltip is set to use the "title" keyword. Here is a what i am using to make the grid:

var myGrid = jQuery("#clients_lingots");
myGrid.jqGrid({
url:'lingots.php',
datatype: 'xml',
height:700,
mty开发者_如何学Pythonpe: 'GET',
deepempty:true ,
colNames:['Nom client'],
colModel :[ 
  {name:'Name', index:'Name', width:1600,align:'left'},
          ],

rowNum:3000,
pager: '#pager_clients_lingots',
sortname: 'Name',
sortorder: 'asc',
viewrecords: true,
caption: 'Clients lingots',
....etc

In my lingots.php file that returns the data from the server (some sql querys) i've put a cell like

$s .= "<cell>&lt;a title='Date creation:".$datecreation."Derniere modification:'>".$qualite."&lt;/a></cell>";

to return a cell like <a title='some info for the tooltip from db">data.for.the.cell</a> thinking that the tooltip will work.

i think that the tooltip has a problem detecting the ajax call data. I do not know how to fix this. Any ideas? thank you


please try with syntax. title='some info for the tooltip from db' or title="some info for the tooltip from db"

if you started with '' or ""; check it.


OK,i've found the answer myself using the gridComplete function like the following example and disabling the "title" atribute in colModel properties like "title:false":

gridComplete: function(){$("[title]").tooltip({position: "bottom right",effect: 'slide'});}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜