I want to display a small image in the first column of jqgrid for all data I get from DB.
jquery("#tableName").jqgrid({
.....
colNames : ['', ''],
colModel : [{
width : '25%',
},{
name : 'someValue',
index : 'somevalue',
widht : '75%',
sorttype: 'text'
}]
});
I want to add an image in the first colmodel. i tried formatter, but not sure about cellvalue, row object, options. Any help would be appreciated.
I did something like this for image
function imageFormat( cellvalue, options, rowObject ){
return '<img src="'+cellvalue+'" />';
}
Where should i give the image src ? how to mention the imageformat in the colmodel ?
Thanks