Keymaps Not Working

Hello,
For some reason I can not get the excel keymap to work correctly. The access keymap seems to work okay. The reason I say the excel keymap is not working is that the arrow keys do not allow me to change the cell. I also noticed that clicking on the row highlights the entire row, but, does not highlight the cell as the example does.
dhtmlx.com/docs/products/dhtmlxG … excel.html

Any tips on what might be wrong?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DHTMLX Tutorial. Contacts</title>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlx.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<script src="../dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="../dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="../dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src="../dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_keymap_excel.js"></script>
<style>
        /*these styles allow dhtmlxLayout to work in fullscreen mode in different browsers correctly*/
        html, body { width: 100%; height: 100%; margin: 0px; overflow: hidden; background-color:white; }
</style>

<div id="gridbox"  style="width:600px; height:250px; background-color:white;overflow:hidden"></div> 

    <script type="text/javascript">
        mygrid = new dhtmlXGridObject('gridbox');
        mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping");
        mygrid.setInitWidths("60,150,100,80,80,80");
        mygrid.enableAutoWidth(true);
        mygrid.setColAlign("right,left,left,right,center,left");
        mygrid.setColTypes("ed,edtxt,ed,price,ch,co");
        mygrid.enableMultiselect(true);
        mygrid.init();
        mygrid.setSkin("light");
        mygrid.loadXML("./data/simple.php");
    </script>
</head>
<body>
</body>
</html>

Cheers,
Eric

The reason I say the excel keymap is not working is that the arrow keys do not allow me to change the cell.
Excel keymap works as designed. Pressing arrows keys navigate to the cell in the next or previous row and select it.

I also noticed that clicking on the row highlights the entire row, but, does not highlight the cell as the example does.
You should add following code to your page:

<style> div.gridbox_light table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected { background-color:#ACCADD; } </style>

Hell Olga,
Thank you for the tip. I see better functionality now with the CSS. However, I still see one issue. The up and down arrow keys visibly move the shading up and down the columns. However, the left and right arrow keys do not. It is only the shading that does not move with the left and right arrows, the selected cell is changing it is just not being shaded, because after moving left or right and then moving up or down I see that I am in the correct column.

0 1 2 3 4
5 6 7 8 9

For example

  1. If I start in cell 0 and press down I see 5 highlighted.
  2. If I start in cell 0 and press right once I see no change in highlighting.
  3. If I start in cell 0 and press right once and down once I’m now in cell 6 and it is highlighted, but, cell 1 was never highlighted.

Regards,
Eric

Unfortunately we cannot reproduce this issue locally. Can you please provide complete demo where we can reproduce it? You can find tutorial how to create complete demo here docs.dhtmlx.com/doku.php?id=othe … leted_demo

Hello Olga,
I think I’ve found the problem. I did not have enableMultiselect(true) set in my code. In fact I did not have that line in my code at all. I noticed that this line is in the example. When I add the following line,

goalsGrid.enableMultiselect(true);

the arrow keys work as expected and I am able to use the left and right arrow keys. However, if I remove this line entirely or I set the value to false I have the problem described in my last post. Is this expected?

Regards,
Eric

PS: can you edit my old post and add an “o” to the first word for me?