ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Akihiro Inoue on October 10, 2017, 01:24:50 pm

Title: Function + Home Shortcut Key
Post by: Akihiro Inoue on October 10, 2017, 01:24:50 pm
Dear Team,

If we press Function Key+ Home   from last cell, the control is automatically moved to first cell.  No Issue with Scroll bar.

But, if the columns are frozen (For example 5 columns) and if we press Function Key+Home, then the control is transferred to first cell and horizontal scroll is not moved to first column and scroll stays in last column.

Please suggest me to fix this issue.




Title: Re: Function + Home Shortcut Key
Post by: paramvir on October 10, 2017, 04:39:40 pm
Home key is designed to set focus on first cell, not to move the scrollbar.

scrollbar is moved when it's required to, in 2nd case scrollbar is not required to move.
Title: Re: Function + Home Shortcut Key
Post by: Akihiro Inoue on October 10, 2017, 05:20:18 pm
Dear Team,

Thank you for your response.

scrollbar is moved when it's required to, in 2nd case scrollbar is not required to move
Please suggest me a work around to fix this scenario as it is required for our case.

i.e., Please let us know the event and api to move scrollbar to first

Thanks in advance
Title: Re: Function + Home Shortcut Key
Post by: paramvir on October 11, 2017, 09:28:58 am
The event is cellKeyDown, key is $.ui.keyCode.HOME and way to scroll the grid is get instance of scrollbar, set cur_pos and call scroll().

Example on how to scroll programmatically: https://paramquery.com/pro/demos/scroll

Code: [Select]
cellKeyDown: function(evt, ui){
if(evt.keyCode == $.ui.keyCode.HOME){
var hscroll = this.hscrollbar();
hscroll.option("cur_pos", 0);
hscroll.scroll();
}
},

This is for virtual mode only.