Welcome Guest Search | Active Topics | Sign In | Register

Calling editCell on page load causing Callback Execute to Postback Options
DTU
Posted: Thursday, August 5, 2010 12:29:25 AM
Rank: Advanced Member
Groups: Member

Joined: 5/19/2010
Posts: 35
Hi,

I'm having an issue with the 'editCell' method: As is the function is called from a BODY tag when the page loads, to focus on the first cell of a grid when the page is loaded.

One one PC this works fine, however on the other when a callback is called the page is posting back instead. When the editCell line is removed, the page performs as it should, going through the Callback panel.

We are using a Code generation tool, with some specific changes having been made from the problematic PC: However nothing that should affect calling a callback panel. This issue is also happening on multiple code-generated pages.

Is there any reason this might be happening?
eo_support
Posted: Thursday, August 5, 2010 10:15:19 AM
Rank: Administration
Groups: Administration

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

Try to use the Grid's EditCellIndex and EditItemIndex to automatically edit a cell on page load. If you try to call editCell on your page load handler, the Grid may not be ready yet. The same problem can also causes callback not kicking in because the CallbackPanel control has not been fully initializes yet. To avoid that problem, try to delay your call with setTimeout.

Thanks!

DTU
Posted: Friday, August 6, 2010 2:05:26 AM
Rank: Advanced Member
Groups: Member

Joined: 5/19/2010
Posts: 35
Thanks, I've set the editCell in the codebehind: Hopefully this will fix the issues we were having.
DTU
Posted: Monday, August 9, 2010 8:52:09 PM
Rank: Advanced Member
Groups: Member

Joined: 5/19/2010
Posts: 35
Hi again,

Thanks: It seems the issue is on our side, but that was definitely a better way to set it.

However, it would seem that when the cell is initially set like this you can't use keyboard navigation until another cell is selected: Is this a known issue?
eo_support
Posted: Tuesday, August 10, 2010 9:15:30 AM
Rank: Administration
Groups: Administration

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

This behavior is by design. When the page is loaded, the Grid does not have focus yet. So keyboard navigation would not work regardless what the selected cell is. You can call this function to set focus to the Grid:

http://doc.essentialobjects.com/library/1/jsdoc.public.control.focus.aspx

Make sure you call this method after the Grid has been loaded. You can call it inside the Grid's ClientSideOnLoad handler like this:

Code: JavaScript
function on_grid_load()
{
    eo_GetObject("Grid1").focus();
}

Code: HTML/ASPX
<eo:Grid ClientSideOnLoad="on_grid_load" ....>
    ....
</eo:Grid>


Once the Grid receives focus, you can use keyboard to navigate the cells.

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.