Inline Cell Editing + clipboard functionality not workng?

Hi,

i have a DHTMLX Grid on which i want to have inline cell editing and clipboard operations both.
but they are not working, below is my code. In below code inline editing is not working but clipboard operations does.

     mygrid = new dhtmlXGridObject('gridbox');
     mygrid.setImagePath("../../codebase/imgs/");
     mygrid.setHeader("Book Title,Author,Price,Quantity");
     mygrid.setInitWidths("150,120,80,80");
     mygrid.setColAlign("left,left,right,right");
     mygrid.setColTypes("ed,ed,price,ed");
     mygrid.setColSorting("str,str,int,int");
     mygrid.attachEvent("onKeyPress", onKeyPressed);
     mygrid.attachEvent("onBeforeSelect", function () { return false; });
     mygrid.init();
     mygrid.setSkin("dhx_skyblue");
     mygrid.loadXML("../dhtmlxGrid/gridCustomSQLConnector.ashx");
     mygrid.enableBlockSelection();

     function onKeyPressed(code, ctrl, shift) 
     {
         if (code == 67 && ctrl) {
             if (!mygrid._selectionArea)
                 return alert("You need to select a block area in grid first");
             mygrid.setCSVDelimiter("\t");
             mygrid.copyBlockToClipboard();
         }
         if (code == 86 && ctrl) {
             mygrid.pasteBlockFromClipboard();
         }
         return true;
     }
     window.onerror = function () {
         alert("Clipboard operations not enabled in your browser.");
         window.open("http://www.febooti.com/support/website-help/website-javascript-copy-clipboard.html", "_blank");
     }

but if i comment out

mygrid.attachEvent("onKeyPress", onKeyPressed); mygrid.attachEvent("onBeforeSelect", function () { return false; });

these above two lines, inline editing start working but clipboard not.

How can i make both functionalities workable on same Grid?

Editing of cells are blocked because of following code:

 mygrid.attachEvent("onBeforeSelect", function () { return false; });

When you double click on any cell to edit it, cell is marked as selected. With code above you disable selection, so editing is disabled too.

So , is there any workaround that both functionalities can be achieved in DHTMLX Grid.

Just remove

mygrid.attachEvent("onBeforeSelect", function () { return false; });

and check if grid works as expected for you

Thanks alot, it works :slight_smile: