Set databoundgrid column to multiline text

I've seen reference in this forum (see link below) to multiline textbox columns, but can't work out how to set the cells in a GridBoundColumn to recognise '\n' line breaks as contained in my dataset table columns. Eg. http://www.syncfusion.com/forums/message.asp?MessageID=5457 Thanks, Peter

2 Replies

AD Administrator Syncfusion Team July 14, 2003 06:24 AM UTC

I don't know that you have to do anything. Attached is a little sample that puts \n in strings a datatable, and they are recognized by the grid without further work. What is different in your situation?


PS Peter Schonefeld July 14, 2003 09:27 PM UTC

Thanks for the tip Clay. My escape code is in the SQL statement like: "SELECT field1 + '\n' + field2" which seems to populate the dataset as a literal string that makes my grid cell look like, "value1\nvalue2"...the following sets things right: foreach(DataRow i in dataSet1.Tables[0].Rows){ string s = (string) i["Name"]; i["Name"] = s.Replace("\\n","\n"); } Regards Peter

Loader.
Up arrow icon