Thursday, February 16, 2012

jqgrid - custom button in cell with jquery ui icon

colModel:[ 
{name:'mycolname',index:'mycolname', width:20,
     formatter: function(cellvalue, options, rowObject) {
        return '<span class="ui-icon ui-icon-folder-open" title="click to open" onclick="clickme('+options.rowId+');"></span>'; } //replace span with button  if you want a real button

},...],


function clickme(rowid) {
            alert(rowid);
}

1 comment:

Rober said...

Thanks men , appreciated your info