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.

Not moving to another cell after pressing Enter key for a Winform DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

32306 Jul 26,2005 06:40 PM Dec 20,2005 04:55 AM Windows Forms 1
loading
Tags: FAQ
jsun@doble.com
Asked On July 26, 2005 06:40 PM

In some cases, you want the cursor staying in the same cell after entering data in a grid cell, then pressing "Enter" key with the System.Windows.Forms.DataGrid. I asked the same question for the Synchfusion GridControl and I got the answer. Synchfusion GridControl is not a data bound control. It has a property "EnterKeyBehavoir" which can be disabled to get the behavior I want. I need to know what I can do with the MS DataGrid and the Synchfusion GridDataBoundGrid. Thank you very much for your help. Jerry

Administrator [Syncfusion]
Replied On December 20, 2005 04:55 AM

Hi Pls put the following code in load event foreach(Control ct in dataGrid1.Controls){ if(ct is TextBox ){ TextBox t=ct as TextBox ; t.Validating+=new CancelEventHandler(t_Validating); } } then u write eventhandler t_Validating.in that u can cancel the change of focus by setting e.Cancel=true >In some cases, you want the cursor staying in the same cell after entering data in a grid cell, then pressing "Enter" key with the System.Windows.Forms.DataGrid. > >I asked the same question for the Synchfusion GridControl and I got the answer. Synchfusion GridControl is not a data bound control. It has a property "EnterKeyBehavoir" which can be disabled to get the behavior I want. I need to know what I can do with the MS DataGrid and the Synchfusion GridDataBoundGrid. > >Thank you very much for your help. > >Jerry >

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.

;