ReoGrid icon indicating copy to clipboard operation
ReoGrid copied to clipboard

Enter to edit: possible?

Open seghier opened this issue 2 years ago • 10 comments

Hello How to edit cells with enter key like in excel? this is better than double click or F2 button; is there a feature must enabled to change this?

seghier avatar Mar 06 '22 15:03 seghier

Any idea? Is this an option can activated or it need to created manually?

seghier avatar Mar 10 '22 07:03 seghier

I think you have to do the logic by programming.

  1. Add an event for KeyDown.
  2. Start cell edit by call StartEdit method

jingwood avatar Mar 10 '22 07:03 jingwood

Thank you jingwood I will try, my work is all with ironpython which is difficult to find informations and i need try to understand the available tips

seghier avatar Mar 10 '22 08:03 seghier

Hi I don't find KeyDown? just CellMouseDown

seghier avatar Mar 10 '22 08:03 seghier

Find it thank you: AfterCellKeyDown

seghier avatar Mar 10 '22 08:03 seghier

Hi jingwood I use sheet.AfterCellKeyDown += self.enterEdit and event: sheet.StartEdit(e.CellPosition) The problem when i press the key the next cell don't enter in edit mode until i press the key again, As you see in the video, the cell enter in the edit mode one by one

https://user-images.githubusercontent.com/6026588/157640970-7f739f60-3b0f-4e08-8b5a-3deb10caba57.mp4

seghier avatar Mar 10 '22 10:03 seghier

Did you tried the BeforeCellKeyDown event. You can set the e.IsCancelled = true to cancel the default action of ReoGrid when enter key is pressed.

jingwood avatar Mar 10 '22 10:03 jingwood

I try it but it stack on the first cell and i can't move to other cells with key or enter

seghier avatar Mar 10 '22 11:03 seghier

Hi jingwood In editor we can directly edit cell when press any key like in excel I can't do that with windows form, i need always to click twice with mouse or use F2, can you please show me where is the code about this? I see othe examples where this feature available , i don't know if that included in the dll or not

seghier avatar Mar 10 '22 12:03 seghier

Thank you jingwood I will try, my work is all with ironpython which is difficult to find informations and i need try to understand the available tips

sorry to ask, is there any code for ironpython example to show how to use ReoGrid? In fact, if possible, I will try to use ReoGrid with https://github.com/khchen/winim

retsyo avatar Oct 13 '22 16:10 retsyo