0
Good morning, I need 2 help from you. First time with Jqgrid.
1- I need to add another column on the grid with an image that will call a modal by passing the value of the line ID.
2- I also need to place a function that will open the editing screen with double click on. Already I can do with a click on the line, but it does not fit me, it needs to be with the double click.
$(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;
});
});
what you have tried?
– user8545
Hello Paul. Actually I already got it. See:
– Danielle Arruda torres
jQuery("#jqGrid"). dblclick(Function() { //Grab Id selected line var Pegaiddagrid = grid.getGridParam("selrow"); //Calls the Edit screen by passing the ID window.Location = '/Management/External/User/Registration/' + Pegaiddagrid; }); Function addressRecourse(cellValue, options, rowdata, action) { Return "<a href='/Management/External user/Profile/" + options.rowId + "'>+ Profile</a>"; }
– Danielle Arruda torres
Thank you. Next time
– Danielle Arruda torres