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.
Syncfusion Feedback

Viewport doesn't move to display row when cltr+end shortcut is pressed

Thread ID:

Created:

Updated:

Platform:

Replies:

121779 Jan 25,2016 02:16 PM UTC Jan 26,2016 07:17 AM UTC JavaScript 1
loading
Tags: ejGrid
Greg Gannicott
Asked On January 25, 2016 02:16 PM UTC

Hi.

When you press 'ctrl + end' to select the final row in the grid, the viewport does not move to display it.

As a result, it's not immediately clear that anything has taken place.

Is this something that can be fixed?

Cheers.

Balaji Marimuthu [Syncfusion]
Replied On January 26, 2016 07:17 AM UTC

Hi Greg,

Thanks for contacting Syncfusion support.

Your requirement is achieved using the rowSelected event in Grid, which triggers after the grid row is selected. Refer to the sample and code example as below.

Sample: http://jsplayground.syncfusion.com/rqmkkvb2

Help Document: http://help.syncfusion.com/js/api/ejgrid#events:rowselected



$("#Grid").ejGrid({

                // the datasource "window.gridData" is referred from jsondata.min.js

                dataSource: window.gridData,

                allowScrolling: true,

                scrollSettings: { width: "100%", height: 400, scrollOneStepBy: 33 },


                rowSelected: function (args) {  //triggers when the row is selected

                    if (this.model.allowScrolling) {

                        var scrollObj = this.getScrollObject();  //get scroller object



                        if (this.selectedRowsIndexes[0] == 0)

                            scrollObj.scrollY(0, true);   //move to top


                        else if (this.selectedRowsIndexes[0] == (this.model.currentViewData.length - 1))

                            scrollObj.scrollY(scrollObj._scrollYdata.scrollable, true);    //move to bottom

                    }

                }
            });


Using scrollY method, we can move the scroller position to the top and bottom for display the selected rows. Refer to the Help Document.
http://help.syncfusion.com/js/api/ejscroller#methods:scrolly

Regards,
Balaji Marimuthu



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

;