I have DataTable which contains some strings with "\n" signs. I need to take those strings and put them into DataGridView cells. "\n" should be interpreted as new line.
What I am doing:
dataGridView1.Rows[1].Cells["actionColumn"].Value = subStepLine["action"].ToString();
where subStepLine["action"]
is cell in DataTable with string inside "firstLine\n\nsecondLine"
I want to show it in DataGridView as:
"firstLine
secondLine"
but it shows as: "firstLine\n\nsecondLine".
On the other hand, when I am doing is like this:
dataGridView1.Rows[1].Cells["actionColumn"].Value = "firstLine\n\nsecondLine"
then it is fine and '\n\n' are treated as new lines.
I have wrapMode set on true.
Should I set something in DataTable too?
If more code needed I can add it, just dont wanted to do my post unredadable