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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I want to access grouping with keyboard

Thread ID:

Created:

Updated:

Platform:

Replies:

120268 Sep 16,2015 06:12 AM UTC Sep 17,2015 10:54 AM UTC JavaScript 1
loading
Tags: ejGrid
Rakesh Advani
Asked On September 16, 2015 06:12 AM UTC

Technology must be angular JS and MVC

I want to access grouping buttons with keyboard

Please refer attachment

Attachment: grouping_with_keybaord_3d1e4195.rar

Madhu Sudhanan P [Syncfusion]
Replied On September 17, 2015 10:54 AM UTC

Hi Rakesh,

Thanks for contacting Syncfusion products.

From the query we understood that you want to group/ungroup column using key board. To do so we can use the following code example to achieve the requirement.


<div class="gridStyle" ng-init="getList()" id="integratorTemplateGrid" ej-grid e-datasource="data"

             e-columns="columns" e-allowkeyboardnavigation="true" e-allowpaging="true"

             e-allowgrouping="true" e-allowfiltering="true" e-filtersettings-filtertype="excel" e-actioncomplete="actioncomplete">

        </div>
     

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

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

                    var currentcell = $("#integratorTemplateGrid").find(".e-activecell");

                   

                    if (e.shiftKey) {


                         if (e.keyCode == 71) { //shift + G - Group

                            var field = obj.getColumnByIndex(obj.model.groupSettings.groupedColumns.length)

                         

                            obj.groupColumn(field["field"]);

                        }


                        if (e.keyCode == 85) { //shift + U - Ungroup

                            var gc = obj.model.groupSettings.groupedColumns;

                            obj.ungroupColumn(gc[gc.length -1]);

                        }


                    }

                   . . . .
                });


We have also created a simple sample and the same can be downloaded from the below location.

Sample Location: http://www.syncfusion.com/downloads/support/forum/120244/ze/ang-key-1793485026

Regards,
Madhu Sudhanan. P

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.

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

;