Author Topic: Cursor move to the next editable cell in the grid when I Press ENTER  (Read 805 times)

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
I have a grid with 20 rows with 10 columns per a row. 
In those 1,2,3 columns are not editable rest of the 7 columns are editable.

If I enter a value in forth column and press ENTER then the cursor should come to next column (fifth) editable textbox.
If last column editable reached then it should be focus on forth column for the next row.
If I press ENTER repeatedly need to go on till the last row.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #1 on: April 06, 2022, 07:42:43 pm »
Please set editModel.onSave = "nextEdit"

https://paramquery.com/pro/api#option-editModel

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #2 on: April 07, 2022, 06:40:02 pm »
I have tired but still non editable cell got focus when hit ENTER

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #3 on: April 07, 2022, 09:43:40 pm »
Please ensure to use the option correctly.

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #4 on: April 08, 2022, 11:19:24 am »
I have implemented correctly but when last cell of the row reached and press enter it will focus on first column that is not editable which already set to editable = false.

My concern is focus should not be on those cell which property set to editable = false

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #5 on: April 08, 2022, 11:51:17 am »
I have made demo for you

please check below link,
https://jsfiddle.net/mvplDeveloper/r2azfxwb/12/

Note : First three columns are not editable....

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #6 on: April 08, 2022, 12:27:06 pm »
Non editable cells can only be skipped when ENTER key is pressed in a editor when editModel.onSave = "nextEdit"

https://jsfiddle.net/gjh95fLx/1/

non editable cells can still be focused with mouse or with keyboard without ENTER key.
« Last Edit: April 08, 2022, 12:31:26 pm by paramvir »

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Cursor move to the next editable cell in the grid when I Press ENTER
« Reply #7 on: April 08, 2022, 03:15:36 pm »
Thanks got the solution