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

Enter key in Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

4852 Jun 4,2003 01:58 PM UTC Jun 4,2003 02:21 PM UTC WinForms 1
loading
Tags: GridControl
Ramu
Asked On June 4, 2003 01:58 PM UTC

Hi, When the user is in GDBG and presses enter key, its not comming out of the grid, rather its moving to next cell. Is there any way to move the focus to OK button when user presses enter button. Many Thx. Best Regards Ram

Administrator [Syncfusion]
Replied On June 4, 2003 02:21 PM UTC

There is a Me.GridDataBoundGrid1.Model.Options.EnterKeyBehavior property that controls how the enter key behaves within the grid, but moving to the OK button is not an option. In the 1.6 code base, there is a property that you can set, Me.GridDataBoundGrid1.WantEnterKey = False to tell the grid not to process the enter key. If you set this, then the form will handle the key. If you want to handle this in 1.5.2.0, you could catch the CurrentCellKeyDown event, and if it is the enter key, call the form's acceptbutton. Private Sub GridDataBoundGrid1_CurrentCellKeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles GridDataBoundGrid1.CurrentCellKeyDown If e.KeyCode = Keys.Enter Then Me.AcceptButton.PerformClick() e.Handled = True End If End Sub

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.

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

;