BlAcK CodA
New Member
I need to render a table with dynamic columns, so I'm populating a GridView setting as data source a \[code\]DataTable\[/code\] and using \[code\]AutoGenerateColumns\[/code\] option.Now, I'd like to format columns header this way:\[code\]| UserName || UserCode || Status |\[/code\]So I'm trying to set something like this in my DataTable:\[code\]myDataTable.Columns.Add(UserName + "<br/>" + UserCode + "<br/>" + Status, typeof(string));\[/code\]but it doesn't work. The header is rendered as: \[code\]UserName<br/>UserCode<br/>Status\[/code\]without any break between lines, so Is there a way to disable HTML encoding for GridView?