<?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: JqGrid: Showing text for HTML elements inside column</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column</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/jqgrid-showing-text-for-html-elements-inside-column/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>abhihello123 on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29270</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29270</guid>
        	        	<description><![CDATA[<p>Sry I copied the basic grid from JqGrid site and then edited that and didn&#39;t notice</p>
<p>that autoencode:true for grid level. So even though I mentioned it for column level it wasn&#39;t working. Now it appears.</p>
]]></description>
        	        	<pubDate>Sat, 03 Aug 2013 14:24:25 +0300</pubDate>
        </item>
        <item>
        	<title>abhihello123 on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29267</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29267</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony said:</p>
<p>Hello,</p>
</p>
<p>Set autoencode to false. Look into the docs what this means.</p>
</p>
</blockquote>
<hr />
<p>Hi Tony,</p>
<p>Forgot to mention I tried it already. I think that is used for data coming from server but this is something I am adding</p>
<p>locally. it didn&#39;t work.</p>
]]></description>
        	        	<pubDate>Fri, 02 Aug 2013 17:03:00 +0300</pubDate>
        </item>
        <item>
        	<title>tony on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29266</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29266</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Set autoencode to false. Look into the docs what this means.</p></p>
]]></description>
        	        	<pubDate>Fri, 02 Aug 2013 16:26:07 +0300</pubDate>
        </item>
        <item>
        	<title>abhihello123 on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29264</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29264</guid>
        	        	<description><![CDATA[<blockquote>
</blockquote>
<blockquote>
<p>tony said:</p>
<p>Hello,</p>
</p>
<p>Please check your code when you build the input. It is quite possible to have some missed &#39; or ".</p>
<p>The sinple way to test is to just make a string like this:</p>
</p>
<p>var activeBtn = "&#60;input type=&#39;button&#39; value=&#39;Publish&#39;&#62;";</p>
</p>
<p>Regards</p>
</blockquote>
<hr />
<p>Tried That. Same output. One thing. I am having n columns but returning (n-1) cells from the server</p>
<p>and have kept the last column for html button. Will this create a problem? Thanks!</p>
]]></description>
        	        	<pubDate>Fri, 02 Aug 2013 12:51:29 +0300</pubDate>
        </item>
        <item>
        	<title>tony on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29262</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29262</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Please check your code when you build the input. It is quite possible to have some missed &#39; or ".</p>
<p>The sinple way to test is to just make a string like this:</p>
</p>
<p>var activeBtn = "&#60;input type=&#39;button&#39; value=&#39;Publish&#39;&#62;";</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Fri, 02 Aug 2013 12:10:52 +0300</pubDate>
        </item>
        <item>
        	<title>abhihello123 on JqGrid: Showing text for HTML elements inside column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29260</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-showing-text-for-html-elements-inside-column#p29260</guid>
        	        	<description><![CDATA[<p>I have used gridComplete to show HTML buttons but it shows the HTML text instead of button and encoded HTML as style which does not look good. Please help me show button instead of html text and remove or change title value.</p>
</p>
<p><strong>The Output</strong></p>
</p>
<p><strong><a href="http://i.stack.imgur.com/Tkmnk.png"><img src="http://i.stack.imgur.com/Tkmnk.png" width="100"  class="sfimageleft spUserImage" alt="output" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></strong></p>
</p>
<p>When I inspect this cell then I could see the following in chrome tools -</p>
<pre class="default prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit9100' value='Select Code' data-codeid='sfcode9100' /></p><div class='sfcode' id='sfcode9100'>&#60;td role=&#34;gridcell&#34; style=&#34;&#34; title=&#34;&#38;amp;lt;input type=&#39;button&#39; value=&#39;Publish&#39; onclick=&#39;publish(100)&#39; /&#38;amp;gt;&#34; aria-describedby=&#34;list_actionBtn&#34;&#62;&#38;lt;input type=&#39;button&#39; value=&#39;Publish&#39; onclick=&#39;publish(100)&#39; /&#38;gt;&#60;/td&#62;</div></pre>
<pre class="default prettyprint prettyprinted"><strong>The jqgrid Code</strong></pre>
<pre class="default prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit7401' value='Select Code' data-codeid='sfcode7401' /></p><div class='sfcode' id='sfcode7401'><strong><pre class=&#34;default prettyprint prettyprinted&#34;><div class=&#34;sfcode&#34;>var myColModel = [ {
    name : &#34;promoId&#34;,
    index : &#39;Promotionid&#39;,
    width : 60
}, {
    name : &#34;promoCode&#34;,
    index : &#39;promotioncode&#39;,
    width : 110
}, {
    name : &#34;name&#34;,
    index : &#39;name&#39;,
    width : 160
}, {
    name : &#34;description&#34;,
    index : &#39;description&#39;,
    width : 250
}, {
    name : &#34;distCode&#34;,
    index : &#39;distributor_code&#39;,
    width : 110
} , {
    name : &#34;statusId&#34;,
    hidden : true
} , {
    name : &#34;statusVal&#34;,
    index : &#39;status&#39;,
    width : 90
}, {
    name : &#34;startDate&#34;,
    index : &#39;start_date&#39;,
    width : 100,
    sorttype : &#34;date&#34;,
    align : &#34;right&#34;
}, {
    name : &#34;endDate&#34;,
    index : &#39;end_date&#39;,
    width : 100,
    sorttype : &#34;date&#34;,
    align : &#34;right&#34;
}, {
    name : &#34;discount&#34;,
    index : &#39;discount&#39;,
    width : 80
}, {
    name : &#34;extension&#34;,
    index : &#39;extension&#39;,
    width : 80
}, {
    name : &#34;isDiscount&#34;,
    hidden : true
}, {
    name : &#34;isExtension&#34;,
    hidden : true
}, {
    name : &#34;actionBtn&#34;,
    width : 100
} ];
$(function() {
    $(&#34;#list&#34;)
            .jqGrid(
                    {
                        url : &#39;/suiactcodegen/action/promotion/promolist&#39;,
                        datatype : &#34;json&#34;,
                        mtype : &#34;GET&#34;,
                        colNames : [ &#34;Promo ID&#34;, &#34;Promo Code&#34;, &#34;Name&#34;,
                                &#34;Description&#34;, &#34;Distributor Code&#34;, &#34;Stt Id&#34;,
                                &#34;Status&#34;, &#34;Start Date&#34;, &#34;End Date&#34;,
                                &#34;Discount&#34;, &#34;Extension&#34;, &#34;Is Disc&#34;, &#34;isExtn&#34;, &#34;&#34; ],
                        colModel : myColModel,
                        pager : &#34;#pager&#34;,
                        rowNum : 10,
                        rowList : [ 10, 20, 30 ],
                        sortname : &#34;end_date&#34;,
                        sortorder : &#34;asc&#34;,
                        viewrecords : true,
                        gridview : true,
                        rownumber : true,
                        autoencode : true,
                        width : &#39;1000px&#39;,
                        height : &#39;auto&#39;,
                        caption : &#34;Promotion Summary&#34;,
                        gridComplete: function() {
                            var ids = $(&#34;#list&#34;).jqGrid(&#39;getDataIDs&#39;);
                            for (var i = 0; i &#60; ids.length; i++) {
                                var rowId = ids[i],
                                    statusId = $(&#34;#list&#34;).jqGrid (&#39;getCell&#39;, rowId, &#39;statusId&#39;),
                                    activeBtn = &#34;&#34;;
                                    if (statusId == 0) { // Inactive
                                        activeBtn = &#34;&#60;input type=&#39;button&#39; value=&#39;Publish&#39; &#34; +
                                           &#34;onclick=&#39;publish(&#34; + rowId + &#34;)&#39; /&#62;&#34;;
                                    }
                                    //else if (statusId == 1) { // Published
                                    //  activeBtn = &#34;&#60;input type=&#39;button&#39; value=&#39;Expire&#39; &#34; +
                                    //       &#34;onclick=&#34;expire(&#34; + rowId + &#34;);&#34; /&#62;&#34;;
                                    //} 
                                 $(&#34;#list&#34;).jqGrid(&#39;setRowData&#39;, rowId, { actionBtn: activeBtn });
                            }
                        } 
                        }).jqGrid(&#39;navGrid&#39;, &#39;#pager&#39;, {
                add : false,
                edit : false,
                del : false,
                search : true,
                refresh : false
            }).jqGrid(&#39;navButtonAdd&#39;, &#39;#pager&#39;, {
                caption : &#34; Edit &#34;,
                // buttonicon: &#34;ui-icon-bookmark&#34;,
                onClickButton : editPromo,
                position : &#34;last&#34;
            });


});</div></pre>
</p>
<p></strong></div>
]]></description>
        	        	<pubDate>Fri, 02 Aug 2013 10:30:38 +0300</pubDate>
        </item>
</channel>
</rss>