We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Grid Edit Needs Up/Down Arrow Keys to Behave Like Enter

Thread ID:

Created:

Updated:

Platform:

Replies:

124620 Jun 17,2016 07:45 PM Jun 22,2016 10:04 AM ASP.NET MVC 5
loading
Tags: Grid
Nicholas Paradiso
Asked On June 17, 2016 07:45 PM

Hello,

This may be a quick and easy answer but I haven't been able to find it.

I have a grid control in Batch Edit Mode.  I want to be able to enter data and then move onto the next cell by using the Up/Down Arrow keys just like the Enter key moves you to the next cell.  Is this possible?

Thanks,
Nick

Venkatesh Ayothi Raman [Syncfusion]
Replied On June 20, 2016 03:34 AM

Hi Nick, 

Thank you for contacting Syncfusion support. 

Yes we can change the keyboard activities using Create event in the Grid and this event triggered while grid rendered fully. So we can modify the default key configuration as per your requirement.  
We have created a following sample for your requirement. Please refer to code example and Help document, 


Code example: 
<Grid> 
@(Html.EJ().Grid<object>("FlatGrid") 
        .Datasource((IEnumerable<object>)ViewBag.datasource) 
        .AllowScrolling() 
         .AllowPaging()    /*Paging Enabled*/ 
              .SelectionType(SelectionType.Single) 
              .EditSettings(edit=>{edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch); }) 
               
 . . .  
 
              .ClientSideEvents(eve=>eve.Create("create")) 
        .Columns(col => 
        { 
            . . . 
            
        })) 
<Create Event> 
function create(args) { 
 
        args.model.keyConfigs.downArrow = ""; //Remove the default Fucntionalities 
        args.model.keyConfigs.upArrow = "";//Remove the default Fucntionalities 
        args.model.keyConfigs.moveCellLeft = "shift+9,38"; // Using uparrow to move cell left 
        args.model.keyConfigs.moveCellRight = "9,40"; //Using down arrow to move cell right 
 
    } 



If we misunderstood your query then could you please provide more details for your requirement? 

Regards, 
Venkatesh Ayothiraman. 


Nicholas Paradiso
Replied On June 20, 2016 07:37 PM

This is exactly what I need except the up arrow does not take me to the previous cell unless the cursor is at the beginning of the cell.  If I type and then click the up arrow it says in the current cell.

Also, is there any documentation on this model.keyConfigs?  I can't find any reference to it in the online help.

Thanks,
Nick

Venkatesh Ayothi Raman [Syncfusion]
Replied On June 21, 2016 08:07 AM

Hi Nick, 

Thank you for the update. 

We were unable to reproduce the issue at our end. Could you please share the following details? 
1)      Browser details. 
2)      Essential Studio Version details. 
3)      Any script error thrown in console window? If so, provide screenshot. 

It would be helpful for us to find the issue and provide the better solution as earliest. 

Regards, 
Venkatesh Ayothiraman. 


Nicholas Paradiso
Replied On June 21, 2016 03:11 PM

Hello,

I am using Internet Explorer 11 and Essential Studio 14.1.0.41.

If I click on a cell to edit and then use the up and down arrows everything moves correctly.  BUT if I click on a cell to edit and type something and then click the up arrow nothing happens, but the down arrow works.  Another interesting observation is that if I click in the middle of a word in the cell and edit so that the cursor remains in the middle of the word, then the up and down arrow do not move it to the next cell.  The arrows only work if the entire text is highlighted or if the cursor is at the end it will move to the right cell and if it is at the beginning it will move to the left cell. 

I could live with this limitation if it is a limitation and not an error.

Thanks,
Nick



Venkatesh Ayothi Raman [Syncfusion]
Replied On June 22, 2016 10:04 AM

Hi Nick, 

Thank you for the update. 

The cursor doesn’t move left or right while press the Up/Down arrow keys in the IE browser. This is the default behavior of IE browsers. For this reason, the current cell doesn’t move left or right while press the Up/Down keys in the Grid.  

We have also checked with the normal input box with IE browser. For reference we have created a sample. Please refer to the sample, 


Note: we can move the next or previous cell using Up/Down arrows keys with some limitations. The limitation is, we can move to right/left cell when cursor position is moved to last/first position of word.   

Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;