This is a migrated thread and some comments may be shown as answers.

How do you enter multiple lines of text in a cell?

1 Answer 551 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ferruccio Barletta
Top achievements
Rank 1
Ferruccio Barletta asked on 15 Oct 2010, 05:23 PM
Programmatically, if I put text with new line characters in it into a cell, it automatically increases the height and displays the text correctly. The question is, when I'm using the control, how do I type the newline characters in from the keyboard. Enter takes you to the next cell.
I've tried Alt-Enter (like Excel), Ctrl-Enter and Shift-Enter but I can't seem to insert newlines into the text.

Do I need to set a property to enable this sort of behavior?

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 20 Oct 2010, 10:04 AM
Hi Ferruccio,

A possible approach to achieve this effect is through defining a CellEditTemplate for the columns you wish to have this behaviour. Place a TextBox in it, make it multiline and you will get the desired behavior.
You can check the attached project that demonstrates this approach.

If you need any additional information please let me know.

Sincerely yours,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Ferruccio Barletta
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or