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.

Choose option in dropdown using keys

Thread ID:

Created:

Updated:

Platform:

Replies:

113841 Oct 11,2013 09:49 AM Oct 22,2013 03:33 AM ASP.NET MVC (Classic) 7
loading
Tags: Grid
Jarek
Asked On October 11, 2013 09:49 AM

Hi. 
I have grid with edit like excel.
In edit and create mode I pass through fields and change their values using TAB key, but when I want changed value of dropdown field I must use mouse. I really need some way to use only keys for edit values of dropdown field.

Maybe some auto-expand dropdown list when I focus on It by TAB ? Or something else which let me pass through dropdown options and checked one of them.

Jarek
Replied On October 11, 2013 10:44 AM

Ok, I resolve this problem this way:

    $(document).ready(function () {
        $(window).keydown(function (e) {
            if (e.keyCode == '32') {

                if ($('#selectid').val()== "opt1")
                    $('#selectid').val("opt2");
                else if ($('#selectid').val() == "opt2")
                    $('#selectid').val("opt1");
            }
        });
    });

So, when I press spacebar (code 32) on focused (focusing by TAB key) dropdown, value is changed to another. But it's hardcode solution. It's good in my app (i have only 2 or max 3 option) but please answer If someone know best resolution for this.

Bala Murugan A.S [Syncfusion]
Replied On October 14, 2013 01:36 AM

Hi Jarek,

 

Thanks for using Syncfusion Products.

 

We suggest you to use up/down arrow keys to change the values of the dropdown when you editing a cell. We have prepared a video demonstration for this and the same can be downloaded from the below link.

 

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/DropDown_ExcelEdit757982060.zip

 

Please let us know if you need any further assistance.

 

Regards,

Balamurugan A.S


Jarek
Replied On October 14, 2013 03:32 AM

Hi, thanks for reply.

I tried arrow keys before I create this post but with no result.

Now I see that in sample (http://mvc.syncfusion.com/demos/ui/grid/Editing/ExcelEdit) It is work perfect (like in your video) but on my grid on focused select:
Left/right arrow - nothing happen
Up/Down arrow - change record selected (next or previous)

Have you some ideas? 

Jarek
Replied On October 14, 2013 06:51 AM

I detect that in focused dropdown (select) I can't capture arrow keys - maybe some default function for changing values in dropdown also can't capture arrowkeys but why ?

I can capture other keys in dropdown but not arrows. But when I focused on textbox or something other field then I can capture arrow keys.





Bala Murugan A.S [Syncfusion]
Replied On October 17, 2013 12:39 AM

Hi Jarek,

Thanks for your update.

We regret to let you know that we are unable to reproduce your issue in our end. Could you please provide a simple sample which will reproduce your issue with more information(video with replication procedure) on you issue so that we could able to sort out the cause of this issue and provide you a better solution quickly?. then information provided would be a great help for us to resolve your issue.

Please let us know if you have any concerns.

Regards,
Balamurugan A.S

Jarek
Replied On October 18, 2013 07:20 AM

Hi.

On the trial 11.3.0.30 my example run ok.
On my 11.1.0.21 licensed version arrows work like I said. 

So it's possible that on 11.1.0.21 I can't use arrows to navigate on dropdown in grid ?

Alan Sangeeth S [Syncfusion]
Replied On October 22, 2013 03:33 AM

Hi Jarek,

Thanks for the update.

We are sorry for the inconvenience caused.

We are able to reproduce your issue in our end (pressing down/up arrow keys in dropdown then the values are changed but the selection moves to next/previous rows). We have prepared a video to demonstrate this and the same can be downloaded from the below link.

Video:

http://files2.syncfusion.com/dtsupport/directtrac/general/DropDownEdit-761943563.zip

Could you please have a look at the above video and confirm whether you are facing the same in your end?

Please let us know if you have any concerns.

Regards,

Alan Sangeeth S


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.

;