3.2.0

ajax cell refresh stops my keyboard navigation

I'm performing a cell edit and sending the data to my server via an ajax call. I'm returning a message telling me whether or not the value updated properly in the database and using the nifty indicator to alert the user.

In order for the indicator to display I'm using
obj.getCellTemplate(column,row).refresh();

in the ajax response function to refresh just the cell I updated.

My problem is that when I am traversing the grid using the keyboard arrows, they stop working when my ajax call returns. I then have to click on a cell with my mouse and can continue using the keyboard.

What it looks like is that the refresh() guy sets focus or something like that on the cell that made the ajax call so that my keyboard events don't apply. When I am editing a different cell when the ajax response comes back I have no problem.

Is there a way to either have the refresh not change the focus or detect where the focus should be and switch it back immediately? Or something else that I haven't thought of?
Chris
May 18,
Just so you know, I'm using "single-cell" selection. I tried saving the cell I was on in a variable, refreshing, and then setting the current cell and selected cell back to that after the refresh, but it didn't help. Can anyone help me?
Chris
May 23,
I had the very same problem.
You can solve it by doing a CellTemplate.element.focus() two times on the cell.
You can find the right syntax on the forum.
Del
May 23,
Here you are:
http://www.activewidgets.com/javascript.forum.4990.1/set-focus-to-a-cell.html
Del
May 23,
It worked - Thanks a ton!
Chris
May 23,
By the way, the code is:

obj.getCellTemplate(selectedCol,selectedRow).element().focus();
Chris
May 23,

This topic is archived.

See also:


Back to support forum