views:

43

answers:

1

I'm trying to insert a new line in a cell of my datatable. When I hover the cell it shows it like it should. Everything has a new line.

Otherwise in the gridview I see the string in 1 line.

Dim info As String = dttopdrachten.Rows(j).Item(0).ToString & vbCrLf & dttopdrachten.Rows(j).Item(2).ToString & vbCrLf & dttopdrachten.Rows(j).Item(3).ToString & vbCrLf & dttopdrachten.Rows(j).Item(4).ToString & vbCrLf & afgewerkt & vbCrLf & dttopdrachten.Rows(j).Item(6).ToString
            dttAgenda.Rows(j).Item(i) = info

As you see I tried vbCrLf, vbNewLine, Environment.Newline, "\n",..

I don't know if it's possible but if anyone knows the solution it would help me alot.

A: 

When I hover the cell it shows it like it should.

So your insert has succeeded

Otherwise in the gridview I see the string in 1 line.

You have to adjust the height of the row(s), and maybe set CellStyle.Wrapmode

Henk Holterman
Thx this works ;)
Tim Decuypere