image column in jqGrid?

后端 未结 4 358
面向向阳花
面向向阳花 2020-12-29 10:01

I want a image column in my jQGrid,I have used a formatter,but doesnot work,please give me the solution for this.

my code is as follows:

jQuery(docum         


        
4条回答
  •  遥遥无期
    2020-12-29 10:39

    A simple solution could be made directly from the query:

    select idres, 'HTML-IMG-SRC=images/tick_' || reserved || '.png' as reserved, indate, outdate from table; -- querying postgres

    Where reserved is 0 or 1 and reflects in the image file name "tick_1.png" or "tick_0.png" depending on the field's value of 'reserved'

    Hope it helps

提交回复
热议问题