PDA

View Full Version : use arrow keys when editing a grid cell?



chachi
28 Mar 2007, 5:52 AM
In this demo you can edit a cell *then navigate to another cell using the arrow keys.*

http://www.yui-ext.com/deploy/yui-ext/docs/
See: "Inline Editing" example under "Examples and Demos\Grid

However, I can't seem to get the arrow navigation to work on my grid once the cell is in edit mode.

Any ideas?

KimH
28 Mar 2007, 6:22 AM
You could listen for the up and down keys... but why would you? If you have started editing a cell and lets say that the cursor is located in the middle of a string "beforecursor|aftercursor" (the | should illustrate a cursor) what should happen if you press the left/right arrows? I would expect it to move one character left or right instead of moving to the previous/next cell. Did you consider this.... or do you have another agenda?

chachi
28 Mar 2007, 6:51 AM
You make a good point.

To answer your question, the advantage of the arrow keys is that you can easily change a cell, move to the next cell, change it, move to the next cell, etc. Nice if you have a lot of cells to change.

But if you're just changing one or two cells then I think the approach you suggest is good. Double-click the cell, make a change, double-click the next cell, make a change, etc.

I forgot to mention this is the behavior in the "Inline Editing" example under "Examples and Demos\Grid".


You could listen for the up and down keys... but why would you? If you have started editing a cell and lets say that the cursor is located in the middle of a string "beforecursor|aftercursor" (the | should illustrate a cursor) what should happen if you press the left/right arrows? I would expect it to move one character left or right instead of moving to the previous/next cell. Did you consider this.... or do you have another agenda?