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
|
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
|
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!
|