Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Monday, 19 January 2015

Add custom action link to jqGrid row | pravin pajapati


Add custom action link to jqGrid row.

function showDetail(id){
//do somthing here...
alert(id);
}

colNames: ['ID',''],
 colModel: [
    { name: "ID", key: true, index: "ID", sortable: false, hidden: true }
                  ,{ name: 'action', align: 'center', width: 25, sortable: false
                      , title: false, fixed: true, search: false
                      , formatter: function (cellvalue, options, rowObject) 
                      { var stImageLinks = '<a title="action tooltip" 
                             onclick="showDetail(\'' + (rowObject.ID) + '\') + '\');"
       href="#"><img src="../images/edit.png" /></a>';
                                            return stImageLinks;
                                        }
                                    }
  },

hope it's useful for you. thank you. Pravin Prajapati