Welcome Guest Search | Active Topics | Sign In | Register

Exit edit mode when grid lost focus Options
Camarate
Posted: Monday, May 13, 2013 10:04:11 AM
Rank: Advanced Member
Groups: Member

Joined: 9/2/2010
Posts: 120
Hi,

My application have a grid with a TextBoxColumn that has a check function fired by ClientSideEndEdit.

When the cell is in edit mode and I click the mouse on any other field in the window, I need that edit mode is closed and the function in ClientSideEndEdit is fired. I tried to set the parameter "onblur" in the grid to a function to exit edit mode through "grid.selectCell(-1);" command but the function is not executed, leaving the cell in edit mode.

What should I do to exit the edit mode when the focus leave the grid?

Regards,

Marcelo Camarate
Camarate
Posted: Thursday, May 16, 2013 9:06:54 PM
Rank: Advanced Member
Groups: Member

Joined: 9/2/2010
Posts: 120
Hi,

Can anyone help me? I don't resolve this issue yet.

Regards,

Marcelo Camarate
eo_support
Posted: Thursday, May 16, 2013 10:29:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Sorry that somehow we missed this issue. There is no reliable way to do this on the Grid since the Grid does not have an onblur event (only simple HTML input elements triggers onbur element). Because there is no reliable way to track focus and focus scope in HTML page, the Grid does not do anything when focus leaves the textbox (it can not track the textbox's onblur event either because a CustomColumn might have multiple input elements for a single cell).

The best way to handle this is to call grid.selectCell(-1) when you need the cell changes to be submitted. For example, when any of your textbox receives focus. The Grid also does this when the page submits, so it is not necessary for you to do so before the page posts back.

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.