SQL row not breaking rows in gridview

I have this line in some sql:

FT_TBL.Title  + CHAR(13) + 'Job:' + str(FT_TBL.JobName) as Title

Now the header is parsed as a border field in C # gridview, the first line puts "Job" on the next line, but after that it's random, some lines are the next line, some are not! Any ideas?

+3
source share
2 answers

Instead of char (13) use <br /> for line breaks in HTML.

Note. Remember to add HtmlEncode = "false" to your columns:

<asp:BoundField DataField="Title" HtmlEncode="false" />
+9
source

Try combining a carriage return with a line feed:

FT_TBL.Title  + CHAR(10) + CHAR(13) + 'Job:' + str(FT_TBL.JobName) as Title
0

Source: https://habr.com/ru/post/1722509/


All Articles