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

Preventing Multi-line entry

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

2 Replies

AD Administrator Syncfusion Team 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.

DC David Cottle 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.

Live Chat Icon For mobile
Up arrow icon