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.
Unfortunately, activation email could not send to your email. Please try again.

Set databoundgrid column to multiline text

Thread ID:

Created:

Updated:

Platform:

Replies:

5673 Jul 13,2003 04:37 PM Jul 14,2003 05:27 PM Windows Forms 2
loading
Tags: GridControl
Peter Schonefeld
Asked On July 13, 2003 04:37 PM

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 02:24 AM

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 05:27 PM

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.

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.

;