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
220
How to focus on the cell below when enter key pressed
posted

Hi..i am using ultrawebgrid.When i am pressing enter key after edditing a cell the curser moves to right i mean to next column.I want the curser to move down in the same column but to the next row.

Thanks

Parents
  • 28464
    posted

     This could be possible by using our client side object model CSOM and the AfterExitEditMod client side event handler. Example:

         <ClientSideEvents BeforeExitEditModeHandler="AfterExitEditMode" />
       
        <script type="text/javascript">

            function AfterExitEditMode(gridID, cellID)
            {
                //debugger;
                var grid = igtbl_getGridById(gridID);
                var cell = igtbl_getCellById(cellID);

                var cellIndex = cell.Index;
                var rowIndex = cell.Row.getIndex();

                if (cellIndex > 0)
                    cellIndex--;
                var newCellID = gridID + "_rc_" + (rowIndex + 1) + "_" + cellIndex;
                var newCell = igtbl_getCellById(newCellID);
               
                newCell.activate()

               
            }
       
        </script>

Reply Children