Author Topic: Problem of Copy and Paste when a pqgrid put in a modal dialog  (Read 4098 times)

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Problem of Copy and Paste when a pqgrid put in a modal dialog
« on: November 26, 2014, 12:29:54 pm »
For Version 2.2,
it will be pasted sccuessfully if I  pressed the "Ctrl-V" 3 times when a pqgrid put in a normal jquery modal dialog. It wants 1 time only if  the dialog set as not modal.

Can it be solve?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Problem of Copy and Paste when a pqgrid put in a modal dialog
« Reply #1 on: November 26, 2014, 04:02:46 pm »
It works fine in the example with grid in modal dialog:

http://paramquery.com/pro/demos/fluid_popup

Check for document level listeners for Ctrl or V keys. Have you been using any other framework besides jQueryUI. Please share a jsfiddle.

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Problem of Copy and Paste when a pqgrid put in a modal dialog
« Reply #2 on: November 27, 2014, 02:06:53 pm »
<div id='popup'>
<div id="grid_json_paste" style="float:left;"></div>
</div>
<button id='xbutton' >Popup</button>

<script>
var colModel = [{ title: "Company", dataType: "string", dataIndx: "company" }  ];
$("#xbutton").click(function() {   
   $("#popup").dialog({modal: true});
 $("#grid_json_paste").pqGrid({
        colModel: $.extend(true, [], colModel),
        width: '300px',
        title: "Grid B",
        toolbar: toolbar,
        resizable: true,
        showBottom: false,
        numberCell: { show: false },
        scrollModel: { autoFit: true }
    });      
});
</script>


I want to press "Ctrl-V" from an excel data two to three times to get the paste result.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Problem of Copy and Paste when a pqgrid put in a modal dialog
« Reply #3 on: November 28, 2014, 08:47:11 pm »
Please use the latest version 2.3.0

There was a z-index issue while copy paste when used in a dialog in 2.2.0