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.

How to navigate in DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

505 Jul 1,2002 11:13 PM Jul 2,2002 04:29 AM Windows Forms 1
loading
Tags: FAQ
Thomas
Asked On July 1, 2002 11:13 PM

Hi, How can I move focus to cell to cell in a DataGrid using "Enter key" instead of "Tab key"?? Can anyone help. Thank thomas

Clay Burch [Syncfusion]
Replied On July 2, 2002 04:29 AM

One way you can do this is to use a derived DataGrid and override the ProcessCmdKey. In your override, catch the Enter key and use SendKeys to change it to a Tab key.
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
		{
			if(msg.WParam.ToInt32() == (int) Keys.Enter)
			{
				SendKeys.Send("{Tab}");
				return true;
			}
			return base.ProcessCmdKey(ref msg, keyData);
		}

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.

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.

;