Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
How-to Reconfigure the "Enter" key functions on EditMode??
posted
Hello. I can't english very well.
But I need help.
 
How-to Reconfigure the "Enter" key functions on EditMode ?
 
I want to
EditMode ----> EnterKey(event.Keycode == 13) ---> NextCell
 
My Source Code
 

function UltraWebGrid1_EditKeyDownHandler(gridName, cellId, key){
// enterkey press ---> nextcell

    if (event.keyCode == 13)
    {
        event.returnValue = false;
       
        var grid = igtbl_getGridById( gridName );
        var ac   = igtbl_getRowById ( cellId );
       
        cell.endEdit(true);
        var nextCell = cell.getNextCell();
        if( nextCell != null )
        {
            alert('enterkey');
            nextCell.activate();
            nextCell.beginEdit();
        }
       
       
        return false;
    }
        return true;

------------------------------------------------------------------------------------------------------------------------

execute code ---> but enter press ---> don't move to nextcell ..

help me plz... thank you

Parents
  • 19308
    posted

    Cancelling the browser event at this point won't really do anything, since the Grid has already determined that an EditKey press has occured.  You instead want to cancel the grid's processing of the event, which is done by returning true from the handler.  Try this instead:

    if(event.keyCode==13)
    {
        event.cancel=true;
        var cell=igtbl_getCellById(cellId).getNextCell();
        if(cell)
        {
            cell.activate();
            cell.beginEdit();
        }
    }

Reply Children
No Data