<?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: How to set custom tooltip content? </title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content</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/how-to-set-custom-tooltip-content/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>J on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24564</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24564</guid>
        	        	<description><![CDATA[<blockquote>
<p>PawelRoman said:I was unclear, sorry. Imagine I have a table with 3 columns, In the first row, cell values are "A", "B", "C", I pass these values in XML they are redered OK. Now, i want to have a tooltip when hovering over a cell "A", and the tooltip content must be "D" (which as you see has nothing to do with ANY cell data). How do I send this "D" value to the grid? Of course it is a dynamic value thet I prepare on a server side, not a static &#39;d&#39; letter. Do I have to have an extra hidden column for it or something like this?</p>
</blockquote>
<hr />
<p>Do something like this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4326' value='Select Code' data-codeid='sfcode4326' /></p>
<div class='sfcode' id='sfcode4326'>
<p>loadComplete: function (data){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var arr =jQuery("#grid").jqGrid(&#39;getDataIDs&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;for(var i = 0; i &#60;&#160; arr.length; i++ ){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var d = jQuery("#grid").getRowData(arr[i]);</p>
<p>&#160;&#160;&#160; jQuery("#grid").jqGrid(&#39;setCell&#39;, arr[i],&#60;cellName of A&#62;, &#60;value of item to go into cell&#62; ,"", {title: d.D});</p>
<p>}</p>
</div>
<p>look at my code here :<a href="http://www.trirand.com/blog/?page_id=393/help/how-to-stop-nselectrow-from-being-called-in-both-the-grid-and-subgrid/" rel="nofollow" target="_blank">http://www.trirand.com/blog/?page_id=393/help/how-to-stop-nselectrow-from-being-called-in-both-the-grid-and-subgrid/</a></p>
]]></description>
        	        	<pubDate>Thu, 08 Sep 2011 18:31:43 +0300</pubDate>
        </item>
        <item>
        	<title>PawelRoman on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24559</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24559</guid>
        	        	<description><![CDATA[<p>I was unclear, sorry. Imagine I have a table with 3 columns, In the first row, cell values are "A", "B", "C", I pass these values in XML they are redered OK. Now, i want to have a tooltip when hovering over a cell "A", and the tooltip content must be "D" (which as you see has nothing to do with ANY cell data). How do I send this "D" value to the grid? Of course it is a dynamic value thet I prepare on a server side, not a static &#39;d&#39; letter. Do I have to have an extra hidden column for it or something like this?</p>
]]></description>
        	        	<pubDate>Thu, 08 Sep 2011 10:17:03 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24553</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24553</guid>
        	        	<description><![CDATA[<p>I wrote you in the previous answer that <strong>cellattr</strong>&#160;attribute can be a function which has up to three parameters. The second parameter is the cell value (<strong>val</strong>).</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9126' value='Select Code' data-codeid='sfcode9126' /></p>
<div class='sfcode' id='sfcode9126'>cellattr: function (rowId, val) {<br />&#160; &#160; return val&#160;=== &#34;foo&#34; ? &#39; title=&#34;bar&#34;&#39; : &#39; title=&#34;You should do &#39; + val + &#39;!!!&#34;&#39;;<br />}</div>
<p>You can even test for the values from other columns of the same row and generate a title based on the values from many</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4372' value='Select Code' data-codeid='sfcode4372' /></p>
<div class='sfcode' id='sfcode4372'>columns.cellattr: function (rowId, val, rawObject) {<br />&#160; &#160; return &#39; title=&#34;&#39; + rawObject.firstName&#160;+ &#39; &#39; + rawObject.lastName&#160;&#39;&#34;&#39;;<br />}</div>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Wed, 07 Sep 2011 18:06:39 +0300</pubDate>
        </item>
        <item>
        	<title>PawelRoman on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24546</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24546</guid>
        	        	<description><![CDATA[<p>Thanks for quick answer. What if my title is not a static text but is a custom value depending on a cell value (but it is not a cell value itself)? How do I pass such value?</p>
]]></description>
        	        	<pubDate>Wed, 07 Sep 2011 17:17:37 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24545</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24545</guid>
        	        	<description><![CDATA[<p>You can use <strong>cellattr</strong> attribute in the <strong>colModel</strong> for a column to set custom tooltip. For example</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8872' value='Select Code' data-codeid='sfcode8872' /></p>
<div class='sfcode' id='sfcode8872'>cellattr: function () { return &#39; title=&#34;my custom fixed tooltip for the column&#34;&#39;; }</div>
<p>define the attribute as a fixed text. I use such form for grid having many checkboxs. In the case I set just the column title as the tooltip.</p>
<p>Another more full form can be</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9341' value='Select Code' data-codeid='sfcode9341' /></p>
<div class='sfcode' id='sfcode9341'>cellattr: function (rowId, val, rawObject) {<br />&#160; &#160; return rawObject[4] === &#34;1&#34; ? &#39; title=&#34;verified&#34;&#39; : &#39; title=&#34;not verified&#34;&#39;;<br />}</div>
<p>In the case one can use <strong>val</strong> (the cell value) and the <strong>rawObject</strong> - the raw representation of the row of data. It has the same format as in JSON/XML data which you use to fill the data. So instead of <strong>rawObject[4]</strong> you could have to use <strong>rawObject.myColName</strong>.</p>
<p>Best regards<br />Oleg&#160;</p></p>
]]></description>
        	        	<pubDate>Wed, 07 Sep 2011 16:54:36 +0300</pubDate>
        </item>
        <item>
        	<title>PawelRoman on How to set custom tooltip content? </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24544</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-set-custom-tooltip-content#p24544</guid>
        	        	<description><![CDATA[<p>Hi, this is a very simple question: how do I set a custom tooltip that would appear when hovering over a grid cell? I&#39;m talking about HTML title attribute in grid&#39;s &#60;td&#62; element.</p>
</p>
<p>It seems that there is title flag in options but it allows only for switching on/off the title. How can I actually set this title to my own custom value for given cell?</p>
]]></description>
        	        	<pubDate>Wed, 07 Sep 2011 16:38:25 +0300</pubDate>
        </item>
</channel>
</rss>