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.

Changing behaviour of Home and End keys

Thread ID:





24894 Feb 14,2005 12:23 AM Feb 14,2005 04:23 AM Windows Forms 1
Tags: GridControl
Sue Harris
Asked On February 14, 2005 12:23 AM

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 04:23 AM

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.

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.