I have a cell in the datagrid, which the original data is as following:
Testing1
Testing2
Testing3
Testing4
There are 4 lines, while it displays on the browser, it shows as a line, and
I tried to replace "\r\n" to <br/>, but the smart ASP helps me to translate
<br/> into "<br/> , so the <br/> is useless here.... How can I do
if the data is more than 1 line? Thanks.
Sergey Poberezovskiy - 11 Jul 2007 07:04 GMT
try to set HtmlEncode="false" on your column (and use <br/>)
> I have a cell in the datagrid, which the original data is as following:
>
[quoted text clipped - 7 lines]
> <br/> into "<br/> , so the <br/> is useless here.... How can I do
> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 07:16 GMT
Thank you very much.
> try to set HtmlEncode="false" on your column (and use <br/>)
>
[quoted text clipped - 11 lines]
>> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 07:38 GMT
Sorry, 1 more thing
How can I set HTMLEncode=false in the coding
GridView.Columns[1].HTMLEncode = false
but i cannot find any attributes about HTMLEncode under GridView.Columns
Thanks.
> try to set HtmlEncode="false" on your column (and use <br/>)
>
[quoted text clipped - 11 lines]
>> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> if the data is more than 1 line? Thanks.
Sergey Poberezovskiy - 11 Jul 2007 08:06 GMT
HtmlEncode is a BoundField property - so any column that inherits from will
support this attribute, but not the Columns collection
> Sorry, 1 more thing
>
[quoted text clipped - 21 lines]
> >> <br/> into "<br/> , so the <br/> is useless here.... How can I do
> >> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 08:18 GMT
OH...
Thank you very much.
> HtmlEncode is a BoundField property - so any column that inherits from
> will
[quoted text clipped - 27 lines]
>> >> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> >> if the data is more than 1 line? Thanks.
Masudur - 11 Jul 2007 08:28 GMT
> I have a cell in the datagrid, which the original data is as following:
>
[quoted text clipped - 7 lines]
> <br/> into "<br/> , so the <br/> is useless here.... How can I do
> if the data is more than 1 line? Thanks.
Hi
did you tried replacing \r\n with environment.newline....?
Md. Masudur Rahman ( Munna )
Kaz Software Ltd.
http://www.kaz.com.bd
http://munnacs.110mb.com