Pages

Monday, May 6, 2013

Create link on JQGrid

add link on JQGrid .  
example : 
 {name:'id',index:'id', width:55},

add script  before " }"  dont forget add comma  " , "    




 ondblClickRow: function(rowid) {
                var grid = $('#toolbar');  
                var myCellData = grid.jqGrid('getCell', rowid, 'TransID');
                window.open('main.php?action=print_error&SeqId='+myCellData,'mywindow','width=400,height=200');

         }

formatter: function (cellvalue, options, rowObject) {
 var cellPrefix = '';
  if (rowObject.Category === 'Science') {
   cellPrefix = iconAlert;
  }
    return cellPrefix + '<a href="http://en.wikipedia.org/wiki/' + cellvalue + '">' + cellvalue + '</a>';
 }


No comments:

Post a Comment