Hello.
I have searched for this, and not been able to find any examples where someone has done this. I'm trying to add a new line into the cell of a DataGridView so the text appears on 2 lines (of the same cell). Here's some code to explain what i'm doing:
But the entries keep showing up on the same line with an unknown character code (ie: -Lawnmower[]-Logcutter) instead of being on two separate lines. How can i make it bump the text down a line (inside the cell) so that it appears like this?:Code:Dim DS As New DataSet("aa") Dim tbl As DataTable = DS.Tables.Add("bb") Dim xRow2 As DataRow = tbl.NewRow() xRow2("Equipment") = "-Lawnmower" & vbCrLf & "-Logcutter" tbl.Rows.Add(xRow2) grdRented.DataSource = DS.Tables("bb")
-Lawnmower
-Logcutter
I've seen this code done (and work) in VB6 with a grid control, so i'm confused as to why i can't get it to work now. Am i missing some super top secret setting that allows it to span two lines?
.




Reply With Quote
