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
close icon

[Enter] key to add line break

By default, when I press [Enter], I am taken to the next Cell. Is there a way I can change that behavior such that pressing [Enter] only adds a line break in the current cell?

5 Replies

TV Thangapriya V Syncfusion Team February 14, 2013 12:00 PM UTC

Hi Robert, 

 

We have analyzed your query. Your requirement can be achieved by setting AcceptsReturn="True" in GridDataColumnStyle for the visible column you want to add a line break in the current cell.

 

Example:

 

<syncfusion:GridDataVisibleColumn MappingName="CustomerID">

       <syncfusion:GridDataVisibleColumn.ColumnStyle>

             <syncfusion:GridDataColumnStyle AcceptsReturn="True" />

       </syncfusion:GridDataVisibleColumn.ColumnStyle>

</syncfusion:GridDataVisibleColumn>

 

 

Please let us know if you have any concerns.

 

Regards,

Thangapriya



RD Robert Dondo February 15, 2013 03:25 PM UTC

Thanks, that helped. But, it only works when I press [SHIFT]+[ENTER] . Is there a way I can make it work with just [ENTER]?


DA Divya A Syncfusion Team March 4, 2013 11:33 AM UTC

Hi Robert,

 

Sorry for the delay caused.

 

By default, in our GridDataControl line break can be inserted by pressing [Shift+Enter] key. When AcceptReturn property is set as True in GridDataColumnStyle as previously suggested, line break can be inserted by pressing [Enter] key.  We have attached a sample in the following location based on this.

 

Please let us know if you have any concern.

 

Regards,

Divya.


GridDataControlSample_5df66a5d.zip


RD Robert Dondo March 22, 2013 06:16 AM UTC

Hi,

Even with the sample supplied, when I press [Enter], the cell loses focus. It only adds a line break when i do a [Shift]+[Enter].


DA Divya A Syncfusion Team April 11, 2013 10:59 AM UTC

Hi Robert,

 

We have tested the reported issue with various versions of Essential Studio and we are able to reproduce this issue in 9.4.0.62 and lower versions. This issue has been resolved in 10.1.0.44 and higher versions. We would recommend you to upgrade to any of our higher versions to resolve this  issue.

 

Regards,

Divya.


Loader.
Live Chat Icon For mobile
Up arrow icon