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. Image for the cookie policy date

ctrl home on grid with frozen rows at top doesn''t work

Hi I have a virtual grid woth frozen rows at the top row ctrl home on this grid doesn''t take the user to the top of the grid, but gets ''stuck'' on the frozen row anyone any ideas how to fix this you can replicate this by using the sample virtual grid and adding this.gridControl1.Rows.FrozenCount = 1; then scrolling down a few pages and pressing ctrl home

3 Replies

AD Administrator Syncfusion Team March 17, 2006 07:44 AM UTC

Hi Peterainbow, When the Ctrl + Home key are pressed the current cell is moved to the first cell and since the first row is frozen and visible in the grid, it dose not scroll through the rest of the rows. But by handling the gridControl1.KeyDown event the intent behavior can be achieved. Below is a code snippet. Let us know if this serves your need. private void gridControl1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { Keys keyCode = e.KeyCode & Keys.KeyCode; bool controlKeyDown = (e.Modifiers & Keys.Control) != Keys.None; bool menuKeyDown = (e.Modifiers & Keys.Menu) != Keys.None; if(keyCode == Keys.Home && controlKeyDown && !menuKeyDown) this.gridControl1.CurrentCell.MoveTo(this.gridControl1.Model.Rows.FrozenCount+1,1,GridSetCurrentCellOptions.ScrollInView,false); } Regards, Calvin.


AD Administrator Syncfusion Team March 18, 2006 07:03 PM UTC

yes this sorts out ctrl home, but... seem to have the same issue with page up where it gets ''stuck'' before reaching the top any ideas??


AD Administrator Syncfusion Team March 21, 2006 03:39 AM UTC

Hi Peterainbow, The PageUp key works fine in the grid version 4.1.0.62. You can get this latest version in the following link. ftp://syncpatch.syncfusion.com/EssentialStudio/v4.1.0.62/syncfusionessentialstudiosetup.exe Regards, Calvin.

Loader.
Live Chat Icon For mobile
Up arrow icon