Clicking on the providerId edit column will take you to the editProvider edit editProvider . specify formatter: editLink in providerId colModel for the editLink call editLink . This creates a link in jqGrid.
Code:
$(document).ready(function(){ //jqGrid $("#providerList").jqGrid({ url:'<%=request.getContextPath() %>/Admin/getProvidersList', datatype: "json", colNames:['Id','Edit','Provider Name'], colModel:[ {name:'providerId',search:false,index:'providerId',hidden:true}, {name:'providerId',search:false,index:'providerId', width:30,sortable: false, formatter: editLink}, {name:'providerName',index:'providerName', width:200}, rowNum:20, rowList:[10,20,30,40,50], rownumbers: true, pager: '#pagerDiv', sortname: 'providerName', viewrecords: true, sortorder: "desc", }); $('#gridContainer div:not(.ui-jqgrid-titlebar)').width("100%"); $('.ui-jqgrid-bdiv').css('height', window.innerHeight * .65); $('#load_providerList').width("130"); $("#providerList").jqGrid('navGrid','#pagerDiv',{edit:false,add:false,del:false},{},{},{}, {closeAfterSearch:true}); $(".inline").colorbox({inline:true, width:"20%"}); }); function editLink(cellValue, options, rowdata, action) { return "<a href='<%=request.getContextPath()%>/Admin/editProvider/" + rowdata.providerId + "' class='ui-icon ui-icon-pencil' ></a>"; }