Hi!
I need help.
I want to format part of a String for a DataGridViewCel in vb.net.
The thing that I'm doing is, inputting details of a person in a datagridview.
So the data is supposed to be formatted with different fonts and then displayed on the DGV cell.
SO bascially my data consists of "Name", "Details 1..." and "Details 2..."
My "Name" has to be bold and the size of that has to be larger than the other text.
"Details 1" and "Details 2" are of the same size and font.
All these 3 come on 3 different lines.
So what I've done till now...
1. I've set multiline property to true in the DGV
Private Sub DGV_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles Me.CellFormatting
e.CellStyle.WrapMode = DataGridViewTriState.True
Me.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
Me.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
End Sub
2. I've created a column and added rows into it
Me.Rows.Add(PName & Environment.NewLine & Assembly & Environment.NewLine & Sex & ", " & Group & ", " & Custom)
(All variables are of String type)
You see, the Newline variables separate the three regions of data.
Question: How do I set only "PName" to a different font, different size and make it bold and leave the rest of the string as it is?