Good morning, I need 2 help from you. First time with JQGrid.
I need to add another column in the grid with an image that will call a modal by passing the value of the line ID.
2- I also need to put a function that will open the editing screen with double click on. I can do with a click on the line, but that does not work for me, it has to be double clicked.
$(function () {
var grid = $("#jqGrid").jqGrid({
//url: '@Url.Action("Lista","Perfil", new { Area = "Gerenciamento" })',
url:'/Gerenciamento/Perfil/ListaPeloDAO',
mtype: 'GET',
datatype: 'json',
colModel: [
{ label: 'Id', name: 'id', width: 50 },
{ label: 'Descricao', name: 'descricao', width:380 },
],
loadonce: true,
pager: '#jqGridPager',
rowNum: 10,
rowList: [10, 20, 30, 50],
viewrecords: true,
height: 250
});
$("#jqGrid").jqGrid('navGrid', 'jqGridPager', { edit: false, add: false, del: false })
jQuery("#jqGrid").click(function () {
//Pega Id linha selecinada
var PegaIdDaGRid = grid.getGridParam("selrow");
//Chama a tela do Editar passando o ID
window.location = '/Gerenciamento/Perfil/Cadastro/' + PegaIdDaGRid;
});
});