jqGrid-cell column with hiperlink

30 Views Asked by At

I am using jqGrid to draw my table, but I want to convert a cell into a link, that is, when I hover over that cell and click I can go to show X information ... Thank you very much ... Below is the code used so far, so you know what I am using and what I should add or change:

$("#jqGrid").jqGrid({
    datatype: "json",
    url: "#{request.contextPath}/rest/selfInvitationRest/getSelfInvitationUsers?" + "taxId=" + 
          $("#frm\\:taxId").val() + "&companyName=" + $("#frm\\:companyName").val()
          + "&state=" + $("#frm\\:state").val() + "&startDate=" + $("#frm\\:startDate_input").val() + 
          "&endDate=" + $("#frm\\:endDate_input").val() + "&locale=#{languageBean.locale}&countryCode=# 
          {loginBean.country}",
    mtype: "POST",
    height: 260,   
    autowidth: true,
    shrinkToFit: true,
    formatter:linkFormat,
    colModel: [
       formatter:"{label: "#{msg['label.taxId']}", index: 'miniSiteUserPK.taxId', name: 
                   'miniSiteUserPK.taxId', sorttype: 'string', sortable: false}",...

Function used for "linkFormat":

function linkFormat(cellvalue, options, rowObject) {
   return "<a href='#' onclick='$(\"#frm\\\\:gridIndex\").val(\"" + (parseInt(options.rowId) - 1) + 
   "\");$(\"#frm\\\\:userDetailRedirect\").click();'>" + cellvalue.trim() + "</a>";
}
0

There are 0 best solutions below