Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to show large image if clicking in image in jqgrid
    primarykey
    data
    text
    <p>jqgrid image column is defined using colmodel below. In form edit mode if mouse is over image cursor changes to hand but click in image is ignored.</p> <p>How to show large image in separarate window if clicked in image ? Large image is retued by url <code>'http://localhost/Grid/GetImage?id=' + options.rowId</code> (without size parameter).</p> <pre><code>{"label":"Logo","name":"_image_Logo","edittype":"image", "editoptions":{"src":""}, "editable":true, "formatter":function(cell,options,row) { return '&lt;img src="http://localhost/Grid/GetImage?size=150&amp;id=' + options.rowId +'" /&gt;'; } , "search":false,"title":false,"width":150}, {"edittype":"file","label":"","name":"Logo","search":false, "title":false,"width":150,"hidden":true, "editrules":{"edithidden":true},"editable":true} </code></pre> <p><strong>Update</strong></p> <p>I tried Oleg and Michael suggestions using colmodel below. I need to pass row id to image controller. In grid clicking image works OK, big image is opened. <code>options.rowId</code> returs image id.</p> <p>In edit form, row id is not passed. How to pass <code>options.rowId</code> instead of <code>e.target.id</code> in click event ?</p> <pre><code>{"name":"Image", "edittype":"image", "editoptions":{ "src":"", "dataEvents":[{"type":"click","fn":function(e) { window.open('GetImage?id=' + e.target.id, e.target.id ) } }]}, "editable":true, "formatter":function(cell,options,row) { return '&lt;a href="GetImage?id=' + options.rowId+'"&gt;&lt;img src="GetImage?size=54&amp;id=' + options.rowId +'" /&gt;&lt;/a&gt;'; } ,"search":false,"title":false,"width":54}, </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload