<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Custom tooltip/title in row?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14564</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14564</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p><a href="http://www.trirand.com/blog/?page_id=393/feature-request/adding-title-attribute-to-grid-table-headers/" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/?p" rel="nofollow">http://www.trirand.com/blog/?p</a>.....e-headers/</a></p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 05 Feb 2010 11:35:33 +0200</pubDate>
        </item>
        <item>
        	<title>forzafortuna on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14497</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14497</guid>
        	        	<description><![CDATA[<blockquote>
<p>&#160;&#160;&#160; // add tooltip on the column headers</p>
<p>&#160;&#160;&#160; var grid = jQuery(&#39;#list&#39;).jqGrid({&#8230;});</p>
<p>&#160;&#160;&#160; var thd = $("thead:first", grid.hDiv).get(0);</p>
<p>&#160;&#160;&#160; for (var i = 0; i &#60; cn.length; i++) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("tr th:eq(" + (i + 1) + ")", thd).attr("title", cn[i]);</p>
<p>&#160;&#160;&#160; }</p>
</blockquote>
<hr />
<p>Hi,</p>
</p>
<p>I used the above code to create header tooltips but failed to get it working in Firefox 3.5. This is my slightly adjusted code that works fine in IE8, Safari and Chrome:</p>
<p>gridComplete: function() {<br />&#160;&#160;&#160; var thd = $("thead:first", grid.hDiv).get(0);<br />&#160;&#160;&#160; for (var i = 0; i &#60; myColums.length; i++) {<br />&#160;&#160; &#160;&#160;&#160;&#160; $("tr th:eq(" + i + ")", thd).attr("title", myColums[i]);<br />&#160;&#160;&#160; }<br />}</p>
</p>
<p>No errors in Firefox and no tooltip either. Does anyone has a fix for this issue?</p>
]]></description>
        	        	<pubDate>Tue, 02 Feb 2010 16:19:22 +0200</pubDate>
        </item>
        <item>
        	<title>glittle on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14387</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14387</guid>
        	        	<description><![CDATA[<p>For the column headings, I&#39;ve manually adjusted the header text, and set the column width of each column to match...</p>
]]></description>
        	        	<pubDate>Fri, 29 Jan 2010 02:56:35 +0200</pubDate>
        </item>
        <item>
        	<title>glittle on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14386</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14386</guid>
        	        	<description><![CDATA[<p>Thanks Oleg!</p>
<p>I&#39;ll try what you suggested.</p>
<p>Glen</p>
]]></description>
        	        	<pubDate>Fri, 29 Jan 2010 02:55:40 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14383</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14383</guid>
        	        	<description><![CDATA[<p>Hi Glen,</p>
<p>such strange look has long headers in old version of IE (in IE 6). How to fix the problem in IE6 I don&#8217;t now currently. Probably Tony could help you. In more modern versions of IE, the text in column headers will be cut off like you want. To add tooltips to headers I use code like</p>
<p>&#160;&#160;&#160; // add tooltip on the column headers</p>
<p>&#160;&#160;&#160; var grid = jQuery(&#39;#list&#39;).jqGrid({...});</p>
<p>&#160;&#160;&#160; var thd = $("thead:first", grid.hDiv).get(0);</p>
<p>&#160;&#160;&#160; for (var i = 0; i &#60; cn.length; i++) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; var tmp = "tr th:eq(" + (i + 1) + ")";</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("tr th:eq(" + (i + 1) + ")", thd).attr("title", cn[i]);</p>
<p>&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; $("tr th:eq(8)", thd).attr("title", "Ist Standardtest?");</p>
<p>where cn is colNames array (array with column headers). If you use empty colNames array and the give the same information in lable of colModel, you should change the code a little.</p>
<p>In my opinion tooltips on column headers could be implemented in jqGrid per default (what think Tony about that). But if you want to change tooltip for a some column to another text as the column name, you can use code like following</p>
<p>$("tr th:eq(8)", thd).attr("title", "Bla bla");</p>
<p>How to change default text of tooltip Tony wrote you before. Here is an code example:</p>
<p>jQuery(&#39;#list&#39;).jqGrid({</p>
<p>&#8230;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadComplete: function() {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var ids = grid.getDataIDs();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (var i = 0; i &#60; ids.length; i++) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var id = ids[i];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var UserName = grid.getCell(id, &#39;UserName&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var Telefon = grid.getCell(id, &#39;Telefon&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var Mobile = grid.getCell(id, &#39;Mobile&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var Email = grid.getCell(id, &#39;Email&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var Location = grid.getCell(id, &#39;Location&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var toolTip = UserName;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Location !== &#39;&#39;) toolTip += &#39;\nLocation: &#39; + Location;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Telefon !== &#39;&#39;) toolTip += &#39;\nTel: &#39; + Telefon;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Mobile !== &#39;&#39;) toolTip += &#39;\nMobile: &#39; + Mobile;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Email !== &#39;&#39;) toolTip += &#39;\nE-Mail: &#39; + Email;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; grid.setCell(id, &#39;UserName&#39;, &#39;&#39;, &#39;&#39;, { title: toolTip });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // one can use grid.getRowData(id)</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // instead of grid.getCell</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
<p>&#8230;</p>
<p>In the code fragment column UserName is visible and columns Telefon,Mobile,Email, Location - hidden. Information from the hidden columns used to set tooltip on the visible cells.</p>
<p>Best regards</p>
<p>Oleg</p>
]]></description>
        	        	<pubDate>Fri, 29 Jan 2010 00:42:58 +0200</pubDate>
        </item>
        <item>
        	<title>glittle on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14379</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14379</guid>
        	        	<description><![CDATA[<p>Here is an example...</p>
<p>[Image Can Not Be Found]</p>
</p>
<p>As you can see, the headers don&#39;t get cut off.</p>
<p>Here are settings from my jqGrid() setup:</p>
<p>&#160;&#160;&#160; height: &#39;auto&#39;,<br />&#160;&#160;&#160; width: &#39;1024px&#39;,<br />&#160;&#160;&#160; cellEdit: true,<br />&#160;&#160;&#160; autowidth: true,<br />&#160;&#160;&#160; shrinkToFit: true,</p>
<p>and the column model:</p>
<p>{name:&#39;P2010HrsAchieved&#39;,index:&#39;P2010HrsAchieved&#39;,label:&#39;2010 Billable Hrs YTD Achieved&#39;,width:150,search:false,resizable:false,editable:true},<br />{name:&#39;P2010RevGoalCurrency&#39;,index:&#39;P2010RevGoalCurrency&#39;,label:&#39;2010 Revenue Goal Currency&#39;,width:150,search:false,resizable:false,editable:true},<br />{name:&#39;P2010RevGoal&#39;,index:&#39;P2010RevGoal&#39;,label:&#39;2010 Revenue Goal&#39;,width:150,search:false,resizable:false,editable:true},</p>
</p>
<p>Is my only option to manually set the column size?</p>
</p>
<p>Thanks,</p>
<p>Glen</p></p>
]]></description>
        	        	<pubDate>Thu, 28 Jan 2010 19:35:06 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14376</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14376</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not sure if I understand. The text in the heading column shod behave as the data. Also which version is used?</p>
<p>Could you please send a link to the problem or post a code?</p>
<p>Thanks</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 28 Jan 2010 19:08:36 +0200</pubDate>
        </item>
        <item>
        	<title>glittle on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14373</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14373</guid>
        	        	<description><![CDATA[<p>Thanks for the reply.</p>
</p>
<p>For case 2, you are right&#8230;</p>
</p>
<p>In a related question, I&#39;m finding that the headings for each column do not cut off. So, if the column is too narrow, the text continues on and overwrites the header of the next column. Is there any way to fix this?</p>
</p>
<p>Glen</p>
]]></description>
        	        	<pubDate>Thu, 28 Jan 2010 18:45:47 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14362</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14362</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>In the current implementation (case 1) it is not possible to use formatter for this purpose, beqouse of the rendering engine, which call first the formatter and then we construct the tooltip.</p>
<p>One possible solution is to use grid complete event and then you can loop througth the rows&#160; (you should get the ids) and set the title attribute of the coulmn.</p>
</p>
<p>For case 2 I think that this is the default behaviour of the grid or I&#39;m missiing something</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 28 Jan 2010 17:45:04 +0200</pubDate>
        </item>
        <item>
        	<title>glittle on Custom tooltip/title in row?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14299</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-tooltiptitle-in-row#p14299</guid>
        	        	<description><![CDATA[<p>Question 1:</p>
<p>Assume I have 3 columns of data:&#160; A, B, C</p>
<p>What I want to to hide columns B and C, but use their data in a tool tip on column A.</p>
<p>Can this be done using a custom formatter?</p>
<p>How would I access the other columns, and how do I set the tool tip?</p>
</p>
<p>Question 2:</p>
<p>For column D, the text may be too long to show in a column. I want to only show, say, 50 characters in the cell. The full text would be shown in the tooltip.</p>
<p>Can this be done using a custom formatter?</p>
</p>
<p>Thanks,</p>
<p>Glen</p>
]]></description>
        	        	<pubDate>Tue, 26 Jan 2010 23:41:36 +0200</pubDate>
        </item>
</channel>
</rss>