tags:

views:

3643

answers:

4

Is it possible have a html link in a column with jqGrid, I can't find any example in the documentation?

+4  A: 

Yes, use a formatter, either a custom formatter or the built-in link formatter.

Craig Stuntz
A: 

within the json data i am using for the grid, i just send html code back with a href tag in, that works for me

beakersoft
A: 

in xml I use entity &lt; instead of < in the a tag like this &lt;a href="dest">my link&lt;/a> and works fine with jqgrid 3.6

+3  A: 

Here's the sample colModel configuration from Craig's link to jqGrid formatting help. It specifies the formatter as showLink and the url and params are specified with formatoptions.

colModel: [ {name:'myname', 
             edittype:'select', 
             formatter:'showlink', 
             formatoptions:{baseLinkUrl:'someurl.php', addParam: '&action=edit'}
Randy Klingelheber
Thanks for posting the sample. Always helpful :)
Dan