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

Changing behaviour of Home and End keys

Thread ID:





24894 Feb 14,2005 05:23 AM UTC Feb 14,2005 09:23 AM UTC WinForms 1
Tags: GridControl
Sue Harris
Asked On February 14, 2005 05:23 AM UTC

Is there a simpler/better way of changing the behaviour of the Home/End keys when not editing to move the current cell rather than entering edit mode, other than overridding the KeyPressed event? Thanks, Sue

Administrator [Syncfusion]
Replied On February 14, 2005 09:23 AM UTC

There are no property settings that affect this. I think you could use the CurrentCellKeyDown event to handle this though.
private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
	if(e.KeyCode == Keys.Home)
		this.gridControl1.CurrentCell.MoveTo(1, 1, GridSetCurrentCellOptions.ScrollInView);
		e.Handled = true;
	else if(e.KeyCode == Keys.End)
                this.gridControl1.ColCount, GridSetCurrentCellOptions.ScrollInView);;
		e.Handled = true;


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

or the page will be automatically redirected to 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