Welcome Guest Search | Active Topics | Sign In | Register

Grid Cell Editing Options
DiscoverSoft
Posted: Thursday, June 23, 2016 12:05:49 PM
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.


eo_support
Posted: Thursday, June 23, 2016 11:31:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
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!
DiscoverSoft
Posted: Friday, June 24, 2016 1:12:40 PM
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!
eo_support
Posted: Friday, June 24, 2016 11:01:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Great to hear that! Please feel free to let us know if there is anything else.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.