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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Ability to give expand/collapse nodes focus

Thread ID:





121777 Jan 25,2016 01:48 PM UTC Jan 26,2016 09:57 AM UTC JavaScript 1
Tags: ejGrid
Greg Gannicott
Asked On January 25, 2016 01:48 PM UTC


Would it be possible to add the ability to give the expand/collapse nodes focus via the keyboard please?

Thanks for reading.

Balaji Marimuthu [Syncfusion]
Replied On January 26, 2016 09:57 AM UTC

Hi Greg,

Thanks for contacting Syncfusion support.

Yes, we can able to focus the expand/collapse nodes in Grid using the jQuery focus method. Refer to the sample and code example as below.
Sample: http://jsplayground.syncfusion.com/l4tw4v2s

<script type="text/javascript">


        $(document).on("keydown", function (e) {

            if (e.altKey && e.keyCode === 74) { // j- key code.

                $("#Grid").focus();  //focus grid



        $("#Grid").on("keydown", function (e) {

            var obj = $("#Grid").ejGrid("instance"), cell;

            if (e.shiftKey) {

                if (e.keyCode == 68) { //shift+D

                    var ele = obj.getContentTable().find("td[class^='e-recordplus']"); //grouping

                    //var ele1 = obj.getContentTable().find("td[class^='e-detailrow']");  //if use detail template or hierarchy

                    $(ele[0]).attr("tabindex", 0);





Please find the keys to focus expand/ collapse node.

Grid focus
Alt + j
Expand/Collapse node
Shift + d

If you want to perform the Expand and collapse operation using the keyboard, we have a default support. So please refer to the demo and documentation in following link.

Demo: http://js.syncfusion.com/demos/web/#!/azure/grid/KeyboardInteraction

Document: http://help.syncfusion.com/js/grid/accessibility

Balaji Marimuthu


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon