|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Two questions regarding editing grid cells using FullRowMode=false with keyboard navigation:
1) when hitting ENTER key to edit a a cell that already contains data, sometimes the field is cleared and sometimes it's not. I can't seem to figure how what causes it to clear. Can you please explain this?
2) I'm using ClientSideEndEdit to trap and check for numeric input and set precision. I have this working, but if the input isNaN then I would like to keep focus on the current cell. cell.focus doesn't seem to work. It always moves on to the next one. Is this possible or what am I missing?
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, Enter does not clear the cell. It does call your ClientSideBeginEdit handler and in the handler, so you may want to check that and see if it clears your cell value. If you want to keep the focus in the cell, you will need to do something like this:
Code: JavaScript
window.setTimeout(function()
{
grid.editCell(cell);
}, 10);
The key is you must let the current cell editing cycle to finish, but then start a new cycle by calling editCell again. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Thanks very much. Both suggestions were helpful. I did not have a ClientSideBeginEdit, but do have a precision formatting function that left extra spaces and pushed the data out of the control view.
Very often it's just something like that but your confirmation feedback helps me know where to look.
I really appreciate it!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Great to hear that! Please feel free to let us know if there is anything else.
Thanks!
|
|