Welcome Guest Search | Active Topics | Sign In | Register

Grid Questions Options
SDDP
Posted: Wednesday, May 20, 2009 2:28:15 PM
Rank: Member
Groups: Member

Joined: 3/16/2009
Posts: 23
I am trying out your grid in 'Excel' style, with FullRowMode="False" and EnableKeyboardNavigation="True" and AllowNewItem="True".

1. Is there a way to have the cells enter edit mode as soon as the cell has the focus? That is the way Excel works, you can use the cursor keys to go to a cell and immediately start typing. The users don't like having an extra Enter key needed.

2. When you are at the last cell in a row and you hit tab, it should go to the first cell in the next row. Is there a way to do that?

Thanks
eo_support
Posted: Wednesday, May 20, 2009 2:59:48 PM
Rank: Administration
Groups: Administration

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

I believe you can handle ClientSideOnCellSelected and then call this method to put the cell into edit mode:

http://doc.essentialobjects.com/library/1/jsdoc.public.grid.editcell.aspx

Note you will want to use setTimeout to delay the call instead of calling editCell inside your ClientSideOnCellSelected directly.

I do not believe there is a way to automatically tab to next row in the current version. I would think it makes perfect sense to do so though. So we will look into it and see if we can implement it.

Thanks!
SDDP
Posted: Wednesday, May 20, 2009 4:07:47 PM
Rank: Member
Groups: Member

Joined: 3/16/2009
Posts: 23
Thanks,

Not sure why you said to use setTimeout to delay the call? How long should the delay be? Could you give an example?

One more thing I came up with: How can you set client side events for the text boxes in the grid? I would want to set onkeypress and onchange events.

Thanks
eo_support
Posted: Wednesday, May 20, 2009 4:16:10 PM
Rank: Administration
Groups: Administration

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

It will be something like this:

Code: JavaScript
function on_grid_cell_selected(grid)
{
    setTimeout(
        function()
        {
            var cell = grid.getSelectedCell();
            grid.editCell(cell.getItemIndex(), cell.getColIndex());
        }, 10);
}


The actual amount of time delay doesn't matter. The ideal is to call editCell after, not before your handler has returned.

You will not be able to hook up any event handler with the built-in TextBoxColumn. You can take a look of CustomColumn. CustomColumn is an advanced feature that allows you to handle everything by yourself, but it is also much more complicated to use.

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.