Author Topic: How to focus on the next cell on the editable = false cell  (Read 2730 times)

hideki.yoshikura

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
How to focus on the next cell on the editable = false cell
« on: June 26, 2020, 12:48:58 pm »
Hi,

Param query version is using 6.2.4.
If the cell is editable = true, you can move to the next cell by pressing Enter key.
But,Pressing enter key on a cell with editable = false does not move the cursor to the next cell

This phenomenon can also be confirmed on the demo page.
For example, if you press the Enter key on the first cell of company name, you will not move to the next focus.
https://paramquery.com/pro/demos51/readonly_cells

Is there an implementation way to press Enter on a cell with editable = false to move to the next cell?
We are considering coding within the range that does not affect performance

Thanking you in advance

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to focus on the next cell on the editable = false cell
« Reply #1 on: June 26, 2020, 02:08:14 pm »
That's by design and is not configurable.

If you want to code it, you may return false in beforeCellKeyDown event and take custom action.

Code: [Select]
beforeCellKeyDown: function(evt, ui){
  if( evt.keyCode == 13 ){//enter key
    //check editability of cell, use isEditable API
    //use Range().select API to select custom cell.
    //use focus method to focus custom cell.
    return false;
  }
}

hideki.yoshikura

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to focus on the next cell on the editable = false cell
« Reply #2 on: June 26, 2020, 02:45:34 pm »
Thank you for your answer.

I was able to know that there is a way to implement it in the beforeCellKeyDown event.

I might ask you this question again, but in that case I would appreciate your favor.

hideki.yoshikura

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to focus on the next cell on the editable = false cell
« Reply #3 on: June 29, 2020, 07:27:11 am »
Thank you
I was able to solve this problem by using beforeCellKeyDown event