Author Topic: enter to save and move to the next row  (Read 640 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
enter to save and move to the next row
« on: October 26, 2023, 05:11:12 pm »
Hello,

Can I make it go to the next line when the user presses enter after typing data into a cell?
or by pressing the tab key.



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6314
    • View Profile
Re: enter to save and move to the next row
« Reply #1 on: October 26, 2023, 06:25:15 pm »
Please use this:

Code: [Select]
editModel: {           
     onSave: 'downFocus'
},

Example: https://paramquery.com/pro/demos/import-xlsx

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: enter to save and move to the next row
« Reply #2 on: October 26, 2023, 07:00:09 pm »
Worked. thanks a lot

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: enter to save and move to the next row
« Reply #3 on: October 26, 2023, 07:09:14 pm »
Can it be in "edit mode" automatically?

Pressing enter moves you to the next line, but you have to tap once to write on that line. clickEdits: is set to 1.

I'm trying it on tablet.

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: enter to save and move to the next row
« Reply #4 on: October 26, 2023, 08:02:22 pm »
When I do 'onSave:nextEdit' the keyboard automatically opens on the next line.

Exactly what I wanted but to the right

I think you need something like downEdit on mobile or clicksToEdit:0 (to switch to automatic edit mode)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6314
    • View Profile
Re: enter to save and move to the next row
« Reply #5 on: October 27, 2023, 07:14:09 am »
Please use the selectEnd event to put the cell into edit mode.

Code: [Select]
selectEnd: function(evt, ui){
var sel = ui.selection.getSelection();
this.editCell(sel[0]);
},

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: enter to save and move to the next row
« Reply #6 on: November 21, 2023, 10:29:29 pm »
Thanks param.