Forum


17:40

Hello, my grid stopped when i'm put the subGrid: true, he doesnt show the gridlines and dont hide the loading, if a set false them he work again plz someone help m.
function subGridExpand(subgrid_id, row_id) {
var subgrid_table_id;
var pager_id;
subgrid_table_id = subgrid_id + "_t";
pager_id = "p_" + subgrid_table_id;
$("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + pager_id + "' class='scroll'></div>");
jQuery("#" + subgrid_table_id).jqGrid({
url: "./WCF/EventoWCF.svc/SelectSubGrid?idrow=" + row_id,
datatype: "json",
colNames: ['Nome', 'Data Envio'],
colModel: [
{ name: "NOME", index: "NOME", width: 80, key: true },
{ name: "DT_ENVIO_MALA", index: "DT_ENVIO_MALA", width: 130, sorttype: 'date', formatter: 'date', formatoptions: { srcformat: 'd-m-y', newformat: 'd/m/y' }, datefmt: 'd/m/y' }
],
rowNum: 10,
pager: pager_id,
sortname: 'NOME',
sortorder: "asc",
height: '100%'
}).navGrid("#" + pager_id, { edit: false, add: false, del: false });
return true;
}
function subGridCollapse(subgrid_id, row_id) {
var subgrid_table_id;
subgrid_table_id = subgrid_id + "_t";
jQuery("#" + subgrid_table_id).remove();
return true;
}
$(document).ready(function() {
gridJs = jQuery("#list").jqGrid({ url: "./WCF/EventoWCF.svc/Select",
editurl: "./WCF/EventoWCF.svc/HandleOpp",
datatype: "json",
mtype: 'GET',
colModel: [{ name: 'id', key: true, index: 'CodEvento', label: 'Codigo', hidden: true, hidedlg: true, width: 60, editable: false },
{ name: 'NOME_EVENTO', index: 'NOME_EVENTO', label: 'Nome', width: 60, editable: true, editoptions: { size: 25, maxlength: 50} },
{ name: 'DT_EVENTO', index: 'DT_EVENTO', label: 'Date', sorttype: 'date', formatter: 'date', formatoptions: { srcformat: 'd-m-y', newformat: 'd/m/y' }, datefmt: 'd/m/y', width: 60, editable: true, editoptions: { size: 25, maxlength: 50,
dataInit: function(elem) {
$(elem).datepicker();
}
}, searchoptions: { dataInit: function(elem) {
$(elem).datepicker();
}
}
},
{ name: 'DESC_EVENTO', index: 'DESC_EVENTO', label: 'Descrição', width: 60, editable: true, edittype: 'textarea', editoptions: { size: 20, cols: 40, maxlength: 50} },
{ name: 'HR_INICIO', index: 'HR_INICIO', label: 'Inicio', width: 60, editable: true, editoptions: { size: 25, maxlength: 50} },
{ name: 'HR_FIM', index: 'HR_FIM', label: 'Fim', width: 60, editable: true, editoptions: { size: 25, maxlength: 50}}],
rowNum: 10,
rowList: [10, 20, 30],
pager: '#pager',
jsonReader: {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
cell: "cell",
id: "0"
},
sortname: 'NOME_EVENTO',
viewrecords: true,
autowidth: true,
subGrid: true,
imgpath: "CSS/redmond/images",
gridview: true,
multiselect: false,
rownumbers: false,
sortorder: "asc",
height: "100%",
viewsortcols: true,
caption: "Evento",
subGridRowExpanded: subGridExpand,
subGridRowColapsed: subGridCollapse
}).navGrid('#pager', { view: true },
{ height: 180, width: 340, reloadAfterSubmit: true, closeOnEscape: true }, //edit
{height: 180, width: 340, reloadAfterSubmit: true, closeOnEscape: true }, //add
{closeOnEscape: true, reloadAfterSubmit: true, closeOnEscape: true }, //del
{multipleSearch: true, closeOnEscape: true }, //search
{height: 180, closeOnEscape: true }); //view
gridJs.filterToolbar({ autosearch: true });
}
Most Users Ever Online: 715
Currently Online:
41 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66