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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set databoundgrid column to multiline text

Thread ID:

Created:

Updated:

Platform:

Replies:

5673 Jul 13,2003 08:37 PM UTC Jul 14,2003 09:27 PM UTC WinForms 2
loading
Tags: GridControl
Peter Schonefeld
Asked On July 13, 2003 08:37 PM UTC

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

Administrator [Syncfusion]
Replied On 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?

Peter Schonefeld
Replied On 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

CONFIRMATION

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.

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

;