|
1 |
<span class="sy0">Hi,<br /><br />I wrote a custom formatter and it works perfectly well. I want to use it in all my grids in my application so I decided to <br />use the extends function to register it (I'm using version 3.5 of jqGrid). But when I run my application firebug tells me that the <br /></span>editButtonFormatter function is not defined. <br /><br />I have the following code that runs after jqGrid javascript file is loaded. <br /><span class="sy0"><br /><</span>script type<span class="sy0">=</span><span class="st0">"text/javascript"</span><span class="sy0">></span><br /> $.extend($.fn.fmatter, {<br /> editButtonFormatter: function(cellvalue, options, rowObject) {<br /> return "Edit Link";<br /> // Note: I've edited out the real code here just to make it very simple - but it still doesn't get registered<br /> // var editURL = $(gridSelector).getGridParam('editURL');<br /> // return "<a href=" + editURL + getPrimaryKey(rowObject) + " rel="nofollow">" + "Edit" + "</>";<br /> }<br /> });<br /><br /><br />Can you tell me what I'm doing wrong please.<br /><br />Regards,<br />Simon</a> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top