|
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?
|
|
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!
|
|
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.
|
|
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?
|
|
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.aspxMake 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!
|
|