Keyboard Navigation and Filter Focus

Hello Everyone,
I’m using the grid with keyboard navigation and filter lists. After I select an item in a filter list the filter has the keyboard focus, therefore, up and down arrow keys will cause the selected filter list item to be changed and a press of return key will cause the grid to be filtered by that item. All of this is what I would expect. The problem I have is how can I return focus to the grid so that arrow keys can be used to navigate the filtered list of grid rows? It was my hope that simply clicking on a grid row would move the focus away from the filter list, but, it does not. Therefore, the only way I can find to get the focus back to the grid is to actually open a grid cell editor.

Can someone tell me how to get the keyboard focus back to the grid with just a single click on a grid row?

Thanks,
Eric

Please, try to use the following code to open the editor of the cell on a single click:
mygrid.enableEditEvents(true,false,false);

The following code allows to set the focus on the opening the editor of a cell:
mygrid.attachEvent(“onEditCell”, function(stage,rId,cInd,nValue,oValue){
if (stage==1){
this.editor.obj.select();
}
return true;
});

Hi Sematik,

Actually I’d rather the editor not open when the row is clicked once. Is there a way I can change the focus from the filter to the grid when a grid row is clicked once?

Not all of my rows are editable and for some users all rows are read only, therefore, opening the editor will not work for all use cases.

I’d like the flow to be

  1. Select an option from the drop down filter using the mouse
  2. Result: Grid filters. Good
  3. Use arrow keys to change selected filter.
  4. Result: Grid does not filter. Good
  5. Press return/enter
  6. Result: Grid filters. Good
  7. Single click on any row and any column to change focus from filter to grid
  8. Result: grid row is visually selected
  9. Use arrow keys to change row selection.
  10. Result: visual indication of selected row changes with use of arrow keys.

Eric

Unfortunately your issue is not clear. All described work well in the following samples:
dhtmlx.com/docs/products/dht … _srnd.html
dhtmlx.com/docs/products/dht … combo.html

If issue still occurs - please provide any kind of sample of your code or a complete demo where the issue can be reconstructed.