Author Topic: The rowDblClick: function() do NOT work correctly with API 5.0.0  (Read 4094 times)

Hidehiro Ishii

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 44
    • View Profile
The rowDblClick: function() do NOT work correctly with API 5.0.0
« 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);
                }
            }
   });

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: The rowDblClick: function() do NOT work correctly with API 5.0.0
« Reply #1 on: December 14, 2017, 02:46:01 pm »
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.

Hidehiro Ishii

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: The rowDblClick: function() do NOT work correctly with API 5.0.0
« Reply #2 on: December 15, 2017, 09:58:50 am »
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



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: The rowDblClick: function() do NOT work correctly with API 5.0.0
« Reply #3 on: December 15, 2017, 06:05:45 pm »
The issue has been found in ui.rowData

Thanks for reporting the issue, would let you know the fix soon.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: The rowDblClick: function() do NOT work correctly with API 5.0.0
« Reply #4 on: December 18, 2017, 05:30:18 pm »
This is fixed in v5.0.1

Hidehiro Ishii

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: The rowDblClick: function() do NOT work correctly with API 5.0.0
« Reply #5 on: December 19, 2017, 08:08:58 am »
Hi Team,

I have tried API 5.0.1.
It seems that it works correctly.
Thank you for your new release.

Regards,
Koichi