ParamQuery grid support forum
General Category => Bug Report => Topic started by: Hidehiro Ishii on December 14, 2017, 06:20:07 am
-
Hi Team,
I have done upgrade API 4.0.3 -> 5.0.0
But after upgrade, the rowDblClick: function( event, ui ) do NOT work correctly.
I will show my sample code as follows.
My sample code works correctly with API 4.0.2 and 4.0.3.
Please advise to solve this problem.
Regards,
Koichi
[Sample Code]
var obj = {
height: 600,
columnTemplate: {
render: function(ui){
if( !ui.rowData.pq_gtitle && ui.colIndx < this.option('groupModel.dataIndx').length ){
return "<p style='text-indent:22px;'>"+ui.cellData+"</p>";
}
}
},
colModel: colM,
groupModel: groupM,
dataModel: dataM,
sortModel: {
single: false,
sorter: [{ dataIndx: 'pl', dir: 'up' }, { dataIndx: 'category', dir: 'up' }, { dataIndx: 'model', dir: 'up'}, { dataIndx: 'revision', dir: 'down'}],
space: true,
multiKey: null
},
scrollModel: { autoFit: true },
numberCell: { show: false, resizable: true, title: "#" },
filterModel: { mode: 'OR', on: true, header: false, type: "local" },
selectionModel: { type: '', mode: 'single'},
showTitle: false,
resizable: true,
virtualX: true,
virtualY: true,
hwrap: false,
wrap: false,
columnBorders: false,
editable: false,
hoverMode: "row",
};
var $grid = $("#PQ_Grid").pqGrid(obj);
$( "#PQ_Grid" ).pqGrid({
rowDblClick: function( event, ui ) {
var url = ui.rowData['link'];
if ( url.substring(0,4) == "http" ) {
window.open(url);
}
}
});
-
It works fine in my tests. https://plnkr.co/edit/i9PFQOYplIs5MDWofhv5?p=preview
Please add and share your changes in the plnkr to reproduce the issue.
-
Hi Team,
Thank you for your suggestion.
I have tried to check my code.
I have understood the rowDblClick: function() works correctly.
But I have found out that the following code which is next line of rowDblClick: function() does NOT work correctly with API 5.0.0.
rowDblClick: function( event, ui ) {
var url = ui.rowData['link']; <- do NOT work correctly
if ( url.substring(0,4) == "http" ) {
window.open(url);
}
}
This code works with API 4.0.3 and 4.0.2.
Please let me know why this code does NOT correctly.
Regards,
Koichi
-
The issue has been found in ui.rowData
Thanks for reporting the issue, would let you know the fix soon.
-
This is fixed in v5.0.1
-
Hi Team,
I have tried API 5.0.1.
It seems that it works correctly.
Thank you for your new release.
Regards,
Koichi