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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Preventing Multi-line entry

Thread ID:





9563 Dec 26,2003 05:10 PM UTC Dec 27,2003 01:07 AM UTC WinForms 2
Tags: GridControl
David Cottle
Asked On December 26, 2003 05:10 PM UTC

I would like for the cells in my grid to not give me another row for editing in the same cell when the enter key is pushed. I would prefer that the editing is ended, or even the current cell is advanced to the next cell when pressing enter. I cannot find a property to adjust this behavior. Also, I tried intercepting the enter key in the Keydown event...it isn''t firing the event on Enter though. Anyone have any ideas? Thanks David

Administrator [Syncfusion]
Replied On December 26, 2003 06:26 PM UTC

The default behavior is for the grid to move the current cell to the right when you press Enter while editing a TextBox cell. If you are seeing the cell accept the Enter key, then check to see if you have somehow explicitly set style.AllowEnter = true for that cell. In a GridDataBoundGrid, you might have done this with the GridBoundColumn.StyleInfo.AllowEnter property for this column, or maybe with the TableStyle.AllowEnter property. With a GridControl, the property might have been set on the cell style or one of the other styles that is used to determine the behavior of a cell.

David Cottle
Replied On December 27, 2003 01:07 AM UTC

That was it. I am still a newb using this grid so thanks for answering the newb question for me.


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

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

Live Chat Icon For mobile
Live Chat Icon