1
Bug Report / Exception when init detail grid with showTitle : false option
« on: December 10, 2018, 08:42:22 am »
Hi.
I'm init a detail gird with option showTitle : false and I got an exception like this.
I jump to the exception and found that it is raised by this function.
Thank you for the best grid. I hope it help improve the grid.
Luan
I'm init a detail gird with option showTitle : false and I got an exception like this.
Code: [Select]
{
height: 10,
pageModel: {type: 'local', rPP : 100},
dataModel: {
data : []
},
showBottom : false,
showHeader : false,
showTitle : false,
colModel: [
{ title: "", dataIndx: "state", width: 30, align: "center", type:'checkBoxSelection', cls: 'ui-state-default ipms_disable', editable: false, resizable: false, sortable:false },
{ title: "File", width: 840, dataIndx: "file"},
{ title: "Type", width: 60, dataIndx: "type" },
{ title: "View", width: 120, dataIndx: "view" },
{ title: "Path", width: 60, dataIndx: "path", hidden : true},
],
editable: false,
flexHeight: true,
flexWidth: true,
numberCell: { show: false },
title: "Selected files"
};
}
The error message in the consoleCode: [Select]
TypeError: $td is undefined; can't access its "length" property[Learn More] pqgrid.js:5595:3
getCellHeader http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:5595 $jqcomp.widget/</proxiedPrototype[prop]</< jQuery
refreshHeader http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:14177 cCheckBoxColumn http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:14070 dispatch8jQuery
generateView http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:1083 _refresh http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:9622 refresh http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:3934 $jqcomp.widget/</proxiedPrototype[prop]</<5jQuery
aftertable http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:8389 rowExpand http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:8480 rowExpand http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:9714 $jqcomp.widget/</proxiedPrototype[prop]</< jQuery toggle http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:8434 cHierarchy http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:8313 dispatch8jQuery
_onClickCell http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:3193 $jqcomp.widget/</proxiedPrototype[prop]</< jQuery _create http://10.162.2.52/static/ipms/libs/grid_2.4.1/pqgrid.js:1949 dispatch2jQuery
I jump to the exception and found that it is raised by this function.
Code: [Select]
fn.getCellHeader = function(obj) {
var colIndx = obj.colIndx,
dataIndx = obj.dataIndx,
colIndx = (colIndx == null) ? this.getColIndx({
dataIndx: dataIndx
}) : colIndx,
$tbl = this.$tbl_header,
$td, options = this.options,
freezeCols = options.freezeCols;
if ($tbl != undefined) {
if ($tbl.length > 1) {
if (colIndx >= freezeCols) {
$tbl = $jqcomp($tbl[1])
} else {
$tbl = $jqcomp($tbl[0])
}
}
var $td = $tbl.children().children("tr.pq-grid-title-row:last").children("td[pq-col-indx=" + colIndx + "]")
}
if ($td.length == 0 || $td[0].style.visibility == "hidden") {
return null
}
return $td
};
Thank you for the best grid. I hope it help improve the grid.
Luan